Esempio n. 1
0
    public static IEnumerator <float> WakeUpHospital()
    {
        GameTime.Clock.ResetSpeed();
        GameLibOfMethods.blackScreen.CrossFadeAlpha(1, 0.5f, false);
        yield return(MEC.Timing.WaitForSeconds(2));

        Player.anim.enabled = true;


        foreach (PlayerStats.Status.Type type in Stats.PlayerStatus.Keys)
        {
            Stats.Add(type, float.MaxValue);
        }

        Player.transform.rotation = Quaternion.Euler(0, 0, 0);

        Stats.RemoveMoney(GameLibOfMethods.HospitalFee);

        Vector3 SpawnPosition = GameLibOfMethods.HospitalRespawnPoint.position;

        SpawnPosition.z = Player.transform.position.z;

        Player.transform.position = SpawnPosition;

        GameLibOfMethods.blackScreen.CrossFadeAlpha(0, 2, false);
        GameLibOfMethods.cantMove = false;
        CameraFollow.Instance.ResetCamera();

        PlayerAnimationHelper.ResetPlayer();
    }