Class GameEntity
- Namespace
- TaleWorlds.Engine
- Assembly
- TaleWorlds.Engine.dll
[EngineClass("rglEntity")]
public sealed class GameEntity : NativeObject
- Inheritance
-
GameEntity
- Inherited Members
- Extension Methods
Properties
BodyFlag
public BodyFlags BodyFlag { get; set; }
Property Value
CenterOfMass
public Vec3 CenterOfMass { get; }
Property Value
ChildCount
public int ChildCount { get; }
Property Value
ClothSimulatorComponentCount
public int ClothSimulatorComponentCount { get; }
Property Value
EntityFlags
public EntityFlags EntityFlags { get; set; }
Property Value
EntityVisibilityFlags
public EntityVisibilityFlags EntityVisibilityFlags { get; set; }
Property Value
GlobalBoxMax
public Vec3 GlobalBoxMax { get; }
Property Value
GlobalBoxMin
public Vec3 GlobalBoxMin { get; }
Property Value
GlobalPosition
public Vec3 GlobalPosition { get; }
Property Value
Mass
public float Mass { get; }
Property Value
MultiMeshComponentCount
public int MultiMeshComponentCount { get; }
Property Value
Name
public string Name { get; set; }
Property Value
Parent
public GameEntity Parent { get; }
Property Value
PhysicsDescBodyFlag
public BodyFlags PhysicsDescBodyFlag { get; }
Property Value
PhysicsGlobalBoxMax
public Vec3 PhysicsGlobalBoxMax { get; }
Property Value
PhysicsGlobalBoxMin
public Vec3 PhysicsGlobalBoxMin { get; }
Property Value
Root
public GameEntity Root { get; }
Property Value
Scene
public Scene Scene { get; }
Property Value
Skeleton
public Skeleton Skeleton { get; set; }
Property Value
Tags
public string[] Tags { get; }
Property Value
- string[]
Methods
ActivateRagdoll()
public void ActivateRagdoll()
AddAllMeshesOfGameEntity(GameEntity)
public void AddAllMeshesOfGameEntity(GameEntity gameEntity)
Parameters
gameEntityGameEntity
AddBodyFlags(BodyFlags, bool)
public void AddBodyFlags(BodyFlags bodyFlags, bool applyToChildren = true)
Parameters
AddChild(GameEntity, bool)
public void AddChild(GameEntity gameEntity, bool autoLocalizeFrame = false)
Parameters
gameEntityGameEntityautoLocalizeFramebool
AddComponent(GameEntityComponent)
public void AddComponent(GameEntityComponent component)
Parameters
componentGameEntityComponent
AddEditDataUserToAllMeshes(bool, bool)
public void AddEditDataUserToAllMeshes(bool entityComponents, bool skeletonComponents)
Parameters
AddLight(Light)
public bool AddLight(Light light)
Parameters
lightLight
Returns
AddMesh(Mesh, bool)
public void AddMesh(Mesh mesh, bool recomputeBoundingBox = true)
Parameters
AddMeshToBone(sbyte, Mesh)
public void AddMeshToBone(sbyte boneIndex, Mesh mesh)
Parameters
AddMultiMesh(MetaMesh, bool)
public void AddMultiMesh(MetaMesh metaMesh, bool updateVisMask = true)
Parameters
AddMultiMeshToSkeleton(MetaMesh)
public void AddMultiMeshToSkeleton(MetaMesh metaMesh)
Parameters
metaMeshMetaMesh
AddMultiMeshToSkeletonBone(MetaMesh, sbyte)
public void AddMultiMeshToSkeletonBone(MetaMesh metaMesh, sbyte boneIndex)
Parameters
AddParticleSystemComponent(string)
public void AddParticleSystemComponent(string particleid)
Parameters
particleidstring
AddTag(string)
public void AddTag(string tag)
Parameters
tagstring
AttachNavigationMeshFaces(int, bool, bool, bool)
public void AttachNavigationMeshFaces(int faceGroupId, bool isConnected, bool isBlocker = false, bool autoLocalize = false)
Parameters
BreakPrefab()
public void BreakPrefab()
BurstEntityParticle(bool)
public void BurstEntityParticle(bool doChildren)
Parameters
doChildrenbool
CallScriptCallbacks()
public void CallScriptCallbacks()
ChangeMetaMeshOrRemoveItIfNotExists(MetaMesh, MetaMesh)
public void ChangeMetaMeshOrRemoveItIfNotExists(MetaMesh entityMetaMesh, MetaMesh newMetaMesh)
Parameters
CheckPointWithOrientedBoundingBox(Vec3)
public bool CheckPointWithOrientedBoundingBox(Vec3 point)
Parameters
pointVec3
Returns
CheckResources(bool, bool)
public bool CheckResources(bool addToQueue, bool checkFaceResources)
Parameters
Returns
ClearComponents()
public void ClearComponents()
ClearEntityComponents(bool, bool, bool)
public void ClearEntityComponents(bool resetAll, bool removeScripts, bool deleteChildEntities)
Parameters
ClearOnlyOwnComponents()
public void ClearOnlyOwnComponents()
ComputeTrajectoryVolume(float, float, float, float, float)
public void ComputeTrajectoryVolume(float missileSpeed, float verticalAngleMaxInDegrees, float verticalAngleMinInDegrees, float horizontalAngleRangeInDegrees, float airFrictionConstant)
Parameters
missileSpeedfloatverticalAngleMaxInDegreesfloatverticalAngleMinInDegreesfloathorizontalAngleRangeInDegreesfloatairFrictionConstantfloat
CopyComponentsToSkeleton()
public void CopyComponentsToSkeleton()
CopyFrom(Scene, GameEntity)
public static GameEntity CopyFrom(Scene scene, GameEntity entity)
Parameters
sceneSceneentityGameEntity
Returns
CopyFromPrefab(GameEntity)
public static GameEntity CopyFromPrefab(GameEntity prefab)
Parameters
prefabGameEntity
Returns
CopyScriptComponentFromAnotherEntity(GameEntity, string)
public void CopyScriptComponentFromAnotherEntity(GameEntity otherEntity, string scriptName)
Parameters
otherEntityGameEntityscriptNamestring
CreateAndAddScriptComponent(string)
public void CreateAndAddScriptComponent(string name)
Parameters
namestring
CreateEmpty(Scene, bool)
public static GameEntity CreateEmpty(Scene scene, bool isModifiableFromEditor = true)
Parameters
Returns
CreateEmptyDynamic(Scene, bool)
public static GameEntity CreateEmptyDynamic(Scene scene, bool isModifiableFromEditor = true)
Parameters
Returns
CreateEmptyWithoutScene()
public static GameEntity CreateEmptyWithoutScene()
Returns
DeselectEntityOnEditor()
public void DeselectEntityOnEditor()
GetAllMeshesWithTag(string)
public IEnumerable<Mesh> GetAllMeshesWithTag(string tag)
Parameters
tagstring
Returns
GetBoneCount()
public sbyte GetBoneCount()
Returns
GetBoneEntitialFrameWithIndex(sbyte)
public MatrixFrame GetBoneEntitialFrameWithIndex(sbyte boneIndex)
Parameters
boneIndexsbyte
Returns
GetBoneEntitialFrameWithName(string)
public MatrixFrame GetBoneEntitialFrameWithName(string boneName)
Parameters
boneNamestring
Returns
GetBoundingBoxMax()
public Vec3 GetBoundingBoxMax()
Returns
GetBoundingBoxMin()
public Vec3 GetBoundingBoxMin()
Returns
GetBoundingBoxRadius()
public float GetBoundingBoxRadius()
Returns
GetCameraParamsFromCameraScript(Camera, ref Vec3)
public void GetCameraParamsFromCameraScript(Camera cam, ref Vec3 dofParams)
Parameters
GetChild(int)
public GameEntity GetChild(int index)
Parameters
indexint
Returns
GetChildren()
public IEnumerable<GameEntity> GetChildren()
Returns
GetChildrenRecursive(ref List<GameEntity>)
public void GetChildrenRecursive(ref List<GameEntity> children)
Parameters
childrenList<GameEntity>
GetClothSimulator(int)
public ClothSimulatorComponent GetClothSimulator(int clothSimulatorIndex)
Parameters
clothSimulatorIndexint
Returns
GetComponentAtIndex(int, ComponentType)
public GameEntityComponent GetComponentAtIndex(int index, GameEntity.ComponentType componentType)
Parameters
indexintcomponentTypeGameEntity.ComponentType
Returns
GetComponentCount(ComponentType)
public int GetComponentCount(GameEntity.ComponentType componentType)
Parameters
componentTypeGameEntity.ComponentType
Returns
GetEditModeLevelVisibility()
public bool GetEditModeLevelVisibility()
Returns
GetEntityAndChildren()
public IEnumerable<GameEntity> GetEntityAndChildren()
Returns
GetFactorColor()
public uint GetFactorColor()
Returns
GetFirstMesh()
public Mesh GetFirstMesh()
Returns
GetFirstScriptOfTypeInFamily<T>()
public T GetFirstScriptOfTypeInFamily<T>() where T : ScriptComponentBehavior
Returns
- T
Type Parameters
T
GetFirstScriptOfType<T>()
public T GetFirstScriptOfType<T>() where T : ScriptComponentBehavior
Returns
- T
Type Parameters
T
GetFrame()
public MatrixFrame GetFrame()
Returns
GetFrame(out MatrixFrame)
public void GetFrame(out MatrixFrame frame)
Parameters
frameMatrixFrame
GetGlobalFrame()
public MatrixFrame GetGlobalFrame()
Returns
GetGlobalScale()
public Vec3 GetGlobalScale()
Returns
GetGuid()
public string GetGuid()
Returns
GetHasFrameChanged()
public bool GetHasFrameChanged()
Returns
GetLight()
public Light GetLight()
Returns
GetLocalScale()
public Vec3 GetLocalScale()
Returns
GetLodLevelForDistanceSq(float)
public float GetLodLevelForDistanceSq(float distSq)
Parameters
distSqfloat
Returns
GetMeshBendedFrame(MatrixFrame, ref MatrixFrame)
public void GetMeshBendedFrame(MatrixFrame worldSpacePosition, ref MatrixFrame output)
Parameters
worldSpacePositionMatrixFrameoutputMatrixFrame
GetMetaMesh(int)
public MetaMesh GetMetaMesh(int metaMeshIndex)
Parameters
metaMeshIndexint
Returns
GetOldPrefabName()
public string GetOldPrefabName()
Returns
GetPhysicsBoundingBoxMax()
public Vec3 GetPhysicsBoundingBoxMax()
Returns
GetPhysicsBoundingBoxMin()
public Vec3 GetPhysicsBoundingBoxMin()
Returns
GetPhysicsMinMax(bool, out Vec3, out Vec3, bool)
public void GetPhysicsMinMax(bool includeChildren, out Vec3 bbmin, out Vec3 bbmax, bool returnLocal)
Parameters
GetPrefabName()
public string GetPrefabName()
Returns
GetPreviousGlobalFrame()
public MatrixFrame GetPreviousGlobalFrame()
Returns
GetQuickBoneEntitialFrame(sbyte, ref MatrixFrame)
public void GetQuickBoneEntitialFrame(sbyte index, ref MatrixFrame frame)
Parameters
indexsbyteframeMatrixFrame
GetScenePointer()
public UIntPtr GetScenePointer()
Returns
GetScriptComponents()
public IEnumerable<ScriptComponentBehavior> GetScriptComponents()
Returns
GetScriptComponents<T>()
public IEnumerable<T> GetScriptComponents<T>() where T : ScriptComponentBehavior
Returns
- IEnumerable<T>
Type Parameters
T
GetUpgradeLevelMask()
public GameEntity.UpgradeLevelMask GetUpgradeLevelMask()
Returns
GetUpgradeLevelMaskCumulative()
public GameEntity.UpgradeLevelMask GetUpgradeLevelMaskCumulative()
Returns
GetUpgradeLevelOfEntity()
public int GetUpgradeLevelOfEntity()
Returns
GetVisibilityExcludeParents()
public bool GetVisibilityExcludeParents()
Returns
GetVisibilityLevelMaskIncludingParents()
public uint GetVisibilityLevelMaskIncludingParents()
Returns
HasComplexAnimTree()
public bool HasComplexAnimTree()
Returns
HasComponent(GameEntityComponent)
public bool HasComponent(GameEntityComponent component)
Parameters
componentGameEntityComponent
Returns
HasPhysicsBody()
public bool HasPhysicsBody()
Returns
HasScene()
public bool HasScene()
Returns
HasScriptComponent(string)
public bool HasScriptComponent(string scName)
Parameters
scNamestring
Returns
HasScriptOfType(Type)
public bool HasScriptOfType(Type t)
Parameters
tType
Returns
HasScriptOfType<T>()
public bool HasScriptOfType<T>() where T : ScriptComponentBehavior
Returns
Type Parameters
T
HasTag(string)
public bool HasTag(string tag)
Parameters
tagstring
Returns
Instantiate(Scene, string, bool)
public static GameEntity Instantiate(Scene scene, string prefabName, bool callScriptCallbacks)
Parameters
Returns
Instantiate(Scene, string, MatrixFrame)
public static GameEntity Instantiate(Scene scene, string prefabName, MatrixFrame frame)
Parameters
sceneSceneprefabNamestringframeMatrixFrame
Returns
IsGhostObject()
public bool IsGhostObject()
Returns
IsGuidValid()
public bool IsGuidValid()
Returns
IsSelectedOnEditor()
public bool IsSelectedOnEditor()
Returns
IsSkeletonAnimationPaused()
public bool IsSkeletonAnimationPaused()
Returns
IsVisibleIncludeParents()
public bool IsVisibleIncludeParents()
Returns
PauseParticleSystem(bool)
public void PauseParticleSystem(bool doChildren)
Parameters
doChildrenbool
PauseSkeletonAnimation()
public void PauseSkeletonAnimation()
PrefabExists(string)
public static bool PrefabExists(string name)
Parameters
namestring
Returns
RecomputeBoundingBox()
public void RecomputeBoundingBox()
ReleaseEditDataUserToAllMeshes(bool, bool)
public void ReleaseEditDataUserToAllMeshes(bool entityComponents, bool skeletonComponents)
Parameters
Remove(int)
public void Remove(int removeReason)
Parameters
removeReasonint
RemoveAllChildren()
public void RemoveAllChildren()
RemoveAllParticleSystems()
public void RemoveAllParticleSystems()
RemoveBodyFlags(BodyFlags, bool)
public void RemoveBodyFlags(BodyFlags bodyFlags, bool applyToChildren = true)
Parameters
RemoveChild(GameEntity, bool, bool, bool, int)
public void RemoveChild(GameEntity childEntity, bool keepPhysics, bool keepScenePointer, bool callScriptCallbacks, int removeReason)
Parameters
childEntityGameEntitykeepPhysicsboolkeepScenePointerboolcallScriptCallbacksboolremoveReasonint
RemoveComponent(GameEntityComponent)
public bool RemoveComponent(GameEntityComponent component)
Parameters
componentGameEntityComponent
Returns
RemoveComponentWithMesh(Mesh)
public bool RemoveComponentWithMesh(Mesh mesh)
Parameters
meshMesh
Returns
RemoveFromPredisplayEntity()
public void RemoveFromPredisplayEntity()
RemoveMultiMesh(MetaMesh)
public bool RemoveMultiMesh(MetaMesh metaMesh)
Parameters
metaMeshMetaMesh
Returns
RemoveMultiMeshFromSkeleton(MetaMesh)
public void RemoveMultiMeshFromSkeleton(MetaMesh metaMesh)
Parameters
metaMeshMetaMesh
RemoveMultiMeshFromSkeletonBone(MetaMesh, sbyte)
public void RemoveMultiMeshFromSkeletonBone(MetaMesh metaMesh, sbyte boneIndex)
Parameters
RemoveScriptComponent(UIntPtr, int)
public void RemoveScriptComponent(UIntPtr scriptComponent, int removeReason)
Parameters
RemoveSkeleton()
public void RemoveSkeleton()
RemoveTag(string)
public void RemoveTag(string tag)
Parameters
tagstring
ResumeParticleSystem(bool)
public void ResumeParticleSystem(bool doChildren)
Parameters
doChildrenbool
ResumeSkeletonAnimation()
public void ResumeSkeletonAnimation()
SelectEntityOnEditor()
public void SelectEntityOnEditor()
SetAlpha(float)
public void SetAlpha(float alpha)
Parameters
alphafloat
SetAnimTreeChannelParameterForceUpdate(float, int)
public void SetAnimTreeChannelParameterForceUpdate(float phase, int channelNo)
Parameters
SetAnimationSoundActivation(bool)
public void SetAnimationSoundActivation(bool activate)
Parameters
activatebool
SetAsPredisplayEntity()
public void SetAsPredisplayEntity()
SetAsReplayEntity()
public void SetAsReplayEntity()
SetBodyFlags(BodyFlags)
public void SetBodyFlags(BodyFlags bodyFlags)
Parameters
bodyFlagsBodyFlags
SetBodyFlagsRecursive(BodyFlags)
public void SetBodyFlagsRecursive(BodyFlags bodyFlags)
Parameters
bodyFlagsBodyFlags
SetBoundingboxDirty()
public void SetBoundingboxDirty()
SetClothComponentKeepState(MetaMesh, bool)
public void SetClothComponentKeepState(MetaMesh metaMesh, bool state)
Parameters
SetClothComponentKeepStateOfAllMeshes(bool)
public void SetClothComponentKeepStateOfAllMeshes(bool state)
Parameters
statebool
SetClothMaxDistanceMultiplier(float)
public void SetClothMaxDistanceMultiplier(float multiplier)
Parameters
multiplierfloat
SetColor(uint, uint, string)
public void SetColor(uint color1, uint color2, string meshTag)
Parameters
SetContourColor(uint?, bool)
public void SetContourColor(uint? color, bool alwaysVisible = true)
Parameters
SetCullMode(MBMeshCullingMode)
public void SetCullMode(MBMeshCullingMode cullMode)
Parameters
cullModeMBMeshCullingMode
SetEnforcedMaximumLodLevel(int)
public void SetEnforcedMaximumLodLevel(int lodLevel)
Parameters
lodLevelint
SetEntityEnvMapVisibility(bool)
public void SetEntityEnvMapVisibility(bool value)
Parameters
valuebool
SetExternalReferencesUsage(bool)
public void SetExternalReferencesUsage(bool value)
Parameters
valuebool
SetFactorColor(uint)
public void SetFactorColor(uint color)
Parameters
coloruint
SetFrame(ref MatrixFrame)
public void SetFrame(ref MatrixFrame frame)
Parameters
frameMatrixFrame
SetFrameChanged()
public void SetFrameChanged()
SetGlobalFrame(in MatrixFrame)
public void SetGlobalFrame(in MatrixFrame frame)
Parameters
frameMatrixFrame
SetGlobalFrameMT(in MatrixFrame)
public void SetGlobalFrameMT(in MatrixFrame frame)
Parameters
frameMatrixFrame
SetLocalPosition(Vec3)
public void SetLocalPosition(Vec3 position)
Parameters
positionVec3
SetMaterialForAllMeshes(Material)
public void SetMaterialForAllMeshes(Material material)
Parameters
materialMaterial
SetMobility(Mobility)
public void SetMobility(GameEntity.Mobility mobility)
Parameters
mobilityGameEntity.Mobility
SetMorphFrameOfComponents(float)
public void SetMorphFrameOfComponents(float value)
Parameters
valuefloat
SetPreviousFrameInvalid()
public void SetPreviousFrameInvalid()
SetReadyToRender(bool)
public void SetReadyToRender(bool ready)
Parameters
readybool
SetRuntimeEmissionRateMultiplier(float)
public void SetRuntimeEmissionRateMultiplier(float emissionRateMultiplier)
Parameters
emissionRateMultiplierfloat
SetUpgradeLevelMask(UpgradeLevelMask)
public void SetUpgradeLevelMask(GameEntity.UpgradeLevelMask mask)
Parameters
SetVectorArgument(float, float, float, float)
public void SetVectorArgument(float vectorArgument0, float vectorArgument1, float vectorArgument2, float vectorArgument3)
Parameters
SetVisibilityExcludeParents(bool)
public void SetVisibilityExcludeParents(bool visible)
Parameters
visiblebool
ToString()
public override string ToString()
Returns
UpdateGlobalBounds()
public void UpdateGlobalBounds()
UpdateTriadFrameForEditor()
public void UpdateTriadFrameForEditor()
UpdateTriadFrameForEditorForAllChildren()
public void UpdateTriadFrameForEditorForAllChildren()
UpdateVisibilityMask()
public void UpdateVisibilityMask()
ValidateBoundingBox()
public void ValidateBoundingBox()
This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).