Derived from the GameOfLife and handles the rabbit logic.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
GameOfDeath GameOfDeath
GameOfDeath RabbitGrid
Namespace: GameOfDeath
Assembly: GameOfDeath (in GameOfDeath.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The RabbitGrid type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | RabbitGrid | Initializes a new instance of the RabbitGrid class |
Methods
Name | Description | |
---|---|---|
![]() | Add T | (Inherited from Entity.) |
![]() | AddTag | (Inherited from Entity.) |
![]() | BaseUpdate | (Overrides GameOfDeath BaseUpdate .) |
![]() | CalculatePositionOfMatrixRabbit | |
![]() | ClearTags | (Inherited from Entity.) |
![]() | Contains T | (Inherited from Entity.) |
![]() | ContainsBehavior T | (Inherited from Entity.) |
![]() | ContainsTag | (Inherited from Entity.) |
![]() | Deactivate | (Inherited from Entity.) |
![]() | Dispose | (Inherited from Entity.) |
![]() | DoDamage | |
![]() | Get T |
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D)
View code on GitHub (Inherited from Entity.) |
![]() | GetActiveBehaviors | (Inherited from Entity.) |
![]() | GetComponentsForSaving | (Inherited from Entity.) |
![]() | GetNumberOfNeighbours | (Inherited from GameOfDeath.) |
![]() | GetOrDefault T | (Inherited from Entity.) |
![]() | GetTags | (Inherited from Entity.) |
![]() | IsGameOver | |
![]() | IsOverPopulated | |
![]() | Randomize | (Inherited from GameOfDeath.) |
![]() | RecalculateRabbitPositionsAndSizes | |
![]() | Remove T | (Inherited from Entity.) |
![]() | RemoveTag | (Inherited from Entity.) |
![]() | Set | (Inherited from Entity.) |
![]() | SetComponents | (Inherited from Entity.) |
![]() | ShouldSurvive | (Inherited from GameOfDeath.) |
![]() | Start T | (Inherited from Entity.) |
![]() | Stop T | (Inherited from Entity.) |
![]() | ToString | (Inherited from Entity.) |
![]() | Update | (Inherited from GameOfDeath.) |
Fields
Name | Description | |
---|---|---|
![]() | components | (Inherited from Entity.) |
![]() | CurrentWorld | (Inherited from GameOfDeath.) |
![]() | height | (Inherited from GameOfDeath.) |
![]() | NextGeneration | (Inherited from GameOfDeath.) |
![]() | width | (Inherited from GameOfDeath.) |
Properties
Name | Description | |
---|---|---|
![]() | GenerationCount | (Inherited from GameOfDeath.) |
![]() | IsActive | (Inherited from Entity.) |
![]() | IsPauseable | (Inherited from GameOfDeath.) |
![]() | Item | (Inherited from GameOfDeath.) |
![]() | MatrixSize | (Inherited from GameOfDeath.) |
![]() | NumberOfComponents | (Inherited from Entity.) |
![]() | Rabbits | |
![]() | UpdatePriority | (Inherited from Entity.) |
Events
Name | Description | |
---|---|---|
![]() | GameOver | |
![]() | MoneyEarned | |
![]() | RabbitKilled |
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