Example #1
0
 public DeadState(CharacterStateMachine HSM, GameObject killedBy) : base(HSM)
 {
     if (killedBy != null)
     {
         character.Health = 0;
         character.KilledSound.Play();
     }
     else //fell
     {
         character.Health = 0;
         if (character.FallSound != null)
         {
             character.FallSound.Play();
         }
     }
     character.Movement = 0;
     character.sprite.LoadAnimation(character.DieAnimation);
 }
Example #2
0
 public ShooterState(CharacterStateMachine sm) : base(sm)
 {
 }
Example #3
0
 public State(CharacterStateMachine sm)
 {
     this.sm   = sm;
     character = sm.Character;
 }
Example #4
0
 public MainState(CharacterStateMachine sm) : base(sm)
 {
 }
Example #5
0
 public HolsterState(CharacterStateMachine SM)
     : base(SM)
 {
 }