Ejemplo n.º 1
0
 public static StateAsleep getInstance()
 {
     if (instance == null)
     {
         instance = new StateAsleep();
     }
     return(instance);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Sleepy sleepy, my foe
 /// </summary>
 public void GoToSleep()
 {
     StateMachine.ChangeState(StateAsleep.getInstance());
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     Checks if the enemy is asleep
 /// </summary>
 /// <returns>True if asleep, false otherwise.</returns>
 public bool IsAsleep()
 {
     return(StateMachine.IsInState(StateAsleep.getInstance()));
 }