Any game object you want to handle in a game should use this interface. It can be an Entity2D,
Entity3D or any other class deriving from Entity. You can access all actors in the world via
GetEntitiesOfType T View code on GitHub
Namespace: DeltaEngine.GameLogicAssembly: DeltaEngine.GameLogic (in DeltaEngine.GameLogic.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Actor type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() | GetBoundingBox | |
![]() | GetBoundingSphere | |
![]() | GetDrawArea | |
![]() | Is2D | |
![]() | IsColliding | |
![]() | RenderModel |
Properties
Name | Description | |
---|---|---|
![]() | RotationZ | |
![]() | Scale | |
![]() | ScaleFactor |
Events
Name | Description | |
---|---|---|
![]() | OrientationChanged | |
![]() | PositionChanged | |
![]() | ScaleChanged |
Remarks
Examples
[Test] public void TestActorSpawnDespawnNotChangeAnything() { var actor = new MockActor(Vector3D.One, 1.0f); actor.RenderModel(); Assert.IsFalse(actor.Is2D()); Assert.AreEqual(Vector3D.One, actor.Position); }
[Test] public void CheckChangePosition() { var actor = new MockActor(Vector3D.One, 1.0f); actor.PositionChanged += () => { CheckPositionHasChanged(actor); }; actor.Position = new Vector3D(2, 2, 2); }
[Test] public void CheckChangeScale() { var actor = new MockActor(Vector3D.One, 1.0f); actor.ScaleChanged += () => { CheckScaleHasChanged(actor); }; actor.Scale = new Vector3D(2, 2, 2); }
See Also