Namespace: DeltaEngine.Entities
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: GameOfDeath.Tests.RabbitGridTests
3 unit tests call DeltaEngine.Entities.DrawableEntity.IsVisible
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: BooleanRemarks
Examples
[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); }
[Test] public void DamagingRabbitsTillDeathMakesThemInvisibleAgain() { var rabbitGrid = CreateRabbitGrid(); AdvanceTimeAndUpdateEntities(); rabbitGrid.DoDamage(rabbitGrid.CalculatePositionOfMatrixRabbit(1, 1), 0.1f, 10.0f); Assert.IsFalse(rabbitGrid.Rabbits[1,1].IsVisible); Assert.IsFalse(rabbitGrid.Rabbits[1,1].RabbitHealthBar.IsVisible); }
See Also