Holds the rabbit sprite and healthbar
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering2D Entity2D
DeltaEngine.Rendering2D HierarchyEntity2D
DeltaEngine.Rendering2D Sprite
GameOfDeath Rabbit
Namespace: GameOfDeath
Assembly: GameOfDeath (in GameOfDeath.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The Rabbit type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Rabbit | Initializes a new instance of the Rabbit 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.) | |
lastTickLerpComponents |
Each element can either be a Lerp, a Lerp List or an array of Lerp objects.
View code on GitHub (Inherited from DrawableEntity.) |
Properties
Events
Name | Description | |
---|---|---|
AnimationEnded | (Inherited from Sprite.) |
Remarks
Examples
[Test] public void CellHavingTwoNeighborsShallSurvive() { var rabbitGrid = CreateRabbitGrid(); AdvanceTimeAndUpdateEntities(); Assert.IsTrue(rabbitGrid.ShouldSurvive(1, 1)); }
[Test] public void CellAliveCausesRabbitToBeVisibleInNextFrame() { var rabbitGrid = CreateRabbitGrid(); AdvanceTimeAndUpdateEntities(); Assert.IsTrue(rabbitGrid.Rabbits[1,1].IsVisible); }
[Test] public void HealthBarShownOnHit() { var rabbitGrid = CreateRabbitGrid(); AdvanceTimeAndUpdateEntities(); rabbitGrid.DoDamage(rabbitGrid.CalculatePositionOfMatrixRabbit(1,1),0.1f, 0.7f); Assert.IsTrue(rabbitGrid.Rabbits[1,1].RabbitHealthBar.IsVisible); }
See Also