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>(); }
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); }