示例#1
0
 void Update()
 {
     if (!playerDamage.IsDead())
     {
         UpdateMovement();
         UpdateButtonInput();
     }
     else
     {
         currentlerpTime     += Time.deltaTime;
         transform.localScale = Vector3.Lerp(currentScale, Vector3.zero, currentlerpTime / maxLearpTime);
         if (currentlerpTime / maxLearpTime >= 1)
         {
             currentlerpTime = maxLearpTime;
         }
     }
 }
示例#2
0
    void Update()
    {
        //if (Input.GetKeyDown(KeyCode.G))
        //{
        //    SceneManager.LoadScene(2);
        //}

        if (player.IsDead() && PlayDeathSE)
        {
            BGM.Stop();
            PlayDeathSE = false;
            Isdying     = true;
            playerDeath.Play();
        }

        if (Isdying == true && !playerDeath.isPlaying)
        {
            SceneManager.LoadScene(2);
        }
    }