IEnumerator DyingEvent() { float elapsedTime = 0f; MovementStatus = PlayerMovementStatus.BleedingOut; //To do: Go in bleeding out animation //TIme in which the player can shoot/revived etc while (elapsedTime < playerHealth.TimeInBleedingOutState) { elapsedTime += Time.deltaTime; yield return(null); } MovementStatus = PlayerMovementStatus.Dead; elapsedTime = 0f; //To do: Go in dead animation //Maybe go in third person or something like that so you can rotate around your dead body. while (elapsedTime < playerHealth.TimeInDeadState) { elapsedTime += Time.deltaTime; yield return(null); } MovementStatus = PlayerMovementStatus.Default; playerHealth.Reset(); inventory.Reset(); GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>().RequestPlayerRespawn(gameObject); //To do: Drop all weapons from the player (fist exluded) }
public void Reset() { Positioning.Reset(); Health.Reset(); }