Example #1
0
 void Start()
 {
     /// Suscribete al estado muerte con la funcion spawndead.
     deadState.SuscribeOnStart(SpawnDead);
     moveState.SuscribeOnStart(StartMove);
     moveState.SuscribeOnJump(JumpMove);
     moveState.SuscribeOnEnd(EndMove);
     audioRun = GetComponent <AudioSource>();
 }
Example #2
0
 void OnEnable()
 {
     if (object.ReferenceEquals(KlausDead, null))
     {
         KlausDead = GameObject.FindObjectOfType <DeadState>();
         KlausMove = GameObject.FindObjectOfType <MoveState>();
     }
     KlausDead.onRespawn += OnDead;
     KlausMove.SuscribeOnJump(OnJump);
 }
Example #3
0
 void Start()
 {
     volumeP = GetComponent <AudioSource>().volume;
     /// Suscribete al estado muerte con la funcion spawndead.
     deadState.SuscribeOnStart(SpawnDead);
     moveState.SuscribeOnStart(StartMove);
     moveState.SuscribeOnJump(JumpMove);
     moveState.SuscribeOnEnd(EndMove);
     crouchState.SuscribeOnStart(Crouching);
     throwState.SuscribeOnStart(Throwing);
     //        crushState.SetFunct(Crushing, CrouchingEND);
     throwState.SuscribeOnEnd(Throwing2);
 }
Example #4
0
 // Use this for initialization
 protected virtual void OnEnable()
 {
     move.SuscribeOnJump(Jump);
     speedStore = 0;
 }