예제 #1
0
 public static StateAsleep getInstance()
 {
     if (instance == null)
     {
         instance = new StateAsleep();
     }
     return(instance);
 }
예제 #2
0
 /// <summary>
 ///     Sleepy sleepy, my foe
 /// </summary>
 public void GoToSleep()
 {
     StateMachine.ChangeState(StateAsleep.getInstance());
 }
예제 #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()));
 }