Player ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Entities Entity
    CreepyTowers Player

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

public sealed class Player : Entity

The Player type exposes the following members.

Constructors

  NameDescription
Public methodPlayer
Initializes a new instance of the Player class
Top
Methods

  NameDescription
Public methodAdd T  (Inherited from Entity.)
Public methodAddTag (Inherited from Entity.)
Public methodChangeAvatar
Public methodClearTags (Inherited from Entity.)
Public methodContains T  (Inherited from Entity.)
Public methodContainsBehavior T  (Inherited from Entity.)
Public methodContainsTag (Inherited from Entity.)
Protected methodDeactivate (Inherited from Entity.)
Public methodDispose (Inherited from Entity.)
Public methodGet T 
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D) View code on GitHub
(Inherited from Entity.)
Protected methodGetActiveBehaviors (Inherited from Entity.)
Protected methodGetComponentsForSaving (Inherited from Entity.)
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Public methodRemove T  (Inherited from Entity.)
Public methodRemoveTag (Inherited from Entity.)
Public methodSet (Inherited from Entity.)
Public methodSetComponents (Inherited from Entity.)
Public methodStart T  (Inherited from Entity.)
Public methodStop T  (Inherited from Entity.)
Public methodToString (Inherited from Entity.)
Public methodUnlockAvatar
Top
Fields

  NameDescription
Protected fieldcomponents (Inherited from Entity.)
Top
Properties

  NameDescription
Public propertyAvailableAvatars
Public propertyAvatar
Public propertyStatic memberCurrent
Public propertyGems
Public propertyGold
Public propertyIsActive (Inherited from Entity.)
Public propertyIsPauseable (Inherited from Entity.)
Public propertyLivesLeft
Public propertyMaxLives
Public propertyName
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyProgressLevel
Public propertyTime
Public propertyUpdatePriority (Inherited from Entity.)
Public propertyXp
Top
Remarks

Tests: CreepyTowers.Tests.PlayerTests
Examples

8 unit tests call CreepyTowers.Player
[Test, CloseAfterFirstFrame]
public void CheckPlayerName()
{
    Assert.AreEqual("mYsT", player.Name);
}
[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());
}
See Also