Player Avatar Property Delta Engine Documentation

Namespace: CreepyTowers
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public Avatar Avatar { get; }

Property Value

Type: Avatar
Remarks

Tests: CreepyTowers.Tests.PlayerTests
Examples

6 unit tests call CreepyTowers.Player.Avatar
[Test, CloseAfterFirstFrame]
public void CheckPlayerDragonAvatar()
{

    Assert.AreEqual(typeof(Dragon), player.Avatar.GetType());
    Assert.AreEqual(1, EntitiesRunner.Current.GetEntitiesOfType<Avatar>().Count);
}
[Test, CloseAfterFirstFrame]
public void CheckPlayerPenguinAvatar()
{
    player.UnlockAvatar(CreepyTowers.Content.Avatars.Penguin);
    player.ChangeAvatar(CreepyTowers.Content.Avatars.Penguin);
    Assert.AreEqual(typeof(Penguin), player.Avatar.GetType());
}
[Test, CloseAfterFirstFrame]
public void CheckPlayerPiggyBankAvatar()
{
    player.UnlockAvatar(CreepyTowers.Content.Avatars.PiggyBank);
    player.ChangeAvatar(CreepyTowers.Content.Avatars.PiggyBank);
    Assert.AreEqual(typeof(PiggyBank), player.Avatar.GetType());
}
See Also