Abstract base airplane that holds the funtionality PlayerPlane and EnemyPlane have in common.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering2D Entity2D
DeltaEngine.Rendering2D HierarchyEntity2D
DeltaEngine.Rendering2D Sprite
SideScroller Plane
SideScroller EnemyPlane
SideScroller PlayerPlane
Namespace: SideScroller
Assembly: SideScroller (in SideScroller.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The Plane type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Plane | Initializes a new instance of the Plane 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 | ||
elapsedSinceLastMissile | ||
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 | ||
MaximumSpeed | ||
mgCadenceInverse | ||
missileCadenceInverse |
Properties
Events
Name | Description | |
---|---|---|
AnimationEnded | (Inherited from Sprite.) | |
Destroyed |
Remarks
Examples
[Test, CloseAfterFirstFrame] public void MovePlaneVertically() { CheckMoveUp(); CheckMoveDown(); CheckStop(); }
[Test, CloseAfterFirstFrame] public void HittingTopBorder() { playerPlane.DrawArea = new Rectangle(new Vector2D(playerPlane.DrawArea.Left, -0.5f), playerPlane.DrawArea.Size); playerPlane.Set(new Velocity2D(new Vector2D(0, -0.1f), 0.5f)); AdvanceTimeAndUpdateEntities(); Assert.AreEqual(ScreenSpace.Current.Viewport.Top, playerPlane.DrawArea.Top, 0.01f); }
[Test, CloseAfterFirstFrame] public void HittingBottomBorder() { playerPlane.DrawArea = new Rectangle(new Vector2D(playerPlane.DrawArea.Left, 1.5f), playerPlane.DrawArea.Size); playerPlane.Set(new Velocity2D(new Vector2D(0, 0.1f), 0.5f)); AdvanceTimeAndUpdateEntities(); Assert.AreEqual(ScreenSpace.Current.Viewport.Bottom, playerPlane.DrawArea.Bottom, 0.01f); }
See Also