Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering2D Entity2D
DeltaEngine.Rendering2D HierarchyEntity2D
DeltaEngine.Rendering2D Sprite
SideScroller Plane
SideScroller EnemyPlane
Namespace: SideScroller
Assembly: SideScroller (in SideScroller.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The EnemyPlane type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | EnemyPlane | Initializes a new instance of the EnemyPlane class |
Methods
Extension Methods
Name | Description | |
---|---|---|
![]() | AffixToPhysics | (Defined by Entity2DPhysicsExtensions.) |
![]() | StartBouncingOffScreenEdges | (Defined by Entity2DExtensions.) |
![]() | StartFalling | (Defined by Entity2DExtensions.) |
![]() | StartMoving | (Defined by Entity2DExtensions.) |
![]() | StartMovingUV | (Defined by Entity2DExtensions.) |
![]() | StartRotating | (Defined by Entity2DExtensions.) |
Fields
Name | Description | |
---|---|---|
![]() | components | (Inherited from Entity.) |
![]() | elapsedSinceLastMGShot | (Inherited from Plane.) |
![]() | elapsedSinceLastMissile | (Inherited from Plane.) |
![]() | lastTickLerpComponents |
Each element can either be a Lerp, a Lerp List or an array of Lerp objects.
View code on GitHub (Inherited from DrawableEntity.) |
![]() | machineGunAndLauncher | (Inherited from Plane.) |
![]() | mgCadenceInverse | (Inherited from Plane.) |
![]() | missileCadenceInverse | (Inherited from Plane.) |
Properties
Name | Description | |
---|---|---|
![]() | Alpha | (Inherited from Entity2D.) |
![]() | BlendMode | (Inherited from Sprite.) |
![]() | Center | (Inherited from Entity2D.) |
![]() | Children | (Inherited from HierarchyEntity2D.) |
![]() | Color | (Inherited from Entity2D.) |
![]() | CurrentFrame | (Inherited from Sprite.) |
![]() | DidFootprintChange | (Inherited from Entity2D.) |
![]() | DrawArea | (Inherited from Entity2D.) |
![]() | Elapsed | (Inherited from Sprite.) |
![]() | FlipMode | (Inherited from Sprite.) |
![]() | Hitpoints | (Inherited from Plane.) |
![]() | IsActive | (Inherited from Plane.) |
![]() | IsPauseable | (Inherited from Entity.) |
![]() | IsPlaying | (Inherited from Sprite.) |
![]() | IsVisible | (Inherited from DrawableEntity.) |
![]() | LastColor | (Inherited from Entity2D.) |
![]() | LastDrawArea | (Inherited from Entity2D.) |
![]() | LastUV | (Inherited from Sprite.) |
![]() | Material | (Inherited from Sprite.) |
![]() | NumberOfComponents | (Inherited from Entity.) |
![]() | Parent | (Inherited from HierarchyEntity2D.) |
![]() | RelativePosition | (Inherited from HierarchyEntity2D.) |
![]() | RelativeRotation | (Inherited from HierarchyEntity2D.) |
![]() | RenderLayer | (Inherited from DrawableEntity.) |
![]() | Rotation | (Inherited from Entity2D.) |
![]() | RotationCenter | (Inherited from Entity2D.) |
![]() | Size | (Inherited from Entity2D.) |
![]() | TopLeft | (Inherited from Entity2D.) |
![]() | UpdatePriority | (Inherited from Entity.) |
![]() | UV | (Inherited from Sprite.) |
![]() | YPosition | (Inherited from Plane.) |
Events
Name | Description | |
---|---|---|
![]() | AnimationEnded | (Inherited from Sprite.) |
![]() | Destroyed | (Inherited from Plane.) |
Remarks
Examples
[Test] public void LowerLifeWhenHitByBullet() { enemy = new EnemyPlane(new Vector2D(1.2f, 0.5f)); Assert.AreEqual(5, enemy.Hitpoints); enemy.CheckIfHitAndReact(new Vector2D(1.2f, 0.5f)); Assert.AreEqual(4, enemy.Hitpoints); }
[Test] public void DefeatEnemyPlane() { enemy = new EnemyPlane(new Vector2D(1.2f, 0.9f)); bool defeated = false; enemy.Destroyed += () => { defeated = true; }; enemy.ReceiveAttack(5); Assert.LessOrEqual(enemy.Hitpoints, 0); Assert.IsTrue(defeated); }
[Test] public void EnemyDespawnsOutsideScreenArea() { enemy = new EnemyPlane(new Vector2D(ScreenSpace.Current.Left - enemy.DrawArea.Width, 0.5f)); AdvanceTimeAndUpdateEntities(); Assert.IsFalse(enemy.IsActive); }
See Also