Exemplo n.º 1
0
 // Update is called once per frame
 void FixedUpdate()
 {
     playerStat.Death();
     Stunnable();
     if (!stunned)
     {
         if (Input.GetButtonDown("dash"))
         {
             dash.Plunge();
         }
         if (!dash.GetDashing())
         {
             SetAttacking();
             if (!attacking)
             {
                 Move();
             }
             PlayerRotation();
             FeetRotation();
             attackTimer += Time.fixedDeltaTime;
             cleaveTimer += Time.fixedDeltaTime;
             if (Input.GetKeyDown("e"))
             {
                 CheckMutations();
             }
             if (Input.GetButtonDown("cleave") && MutationManager.Instance.TentacleMutation.CurrentLevel > 0 && cleaveTimer > cleaveCooldown)
             {
                 Cleave();
             }
             else if (Input.GetAxis("attack") > 0 && attackTimer > maxAttackCooldown / playerStat.GetAttackSpeed() / blood.GetAttackSpeedMod())
             {
                 if (MutationManager.Instance.DancingSwordMutation.CurrentLevel == 0)
                 {
                     Attack();
                 }
                 else
                 {
                     DancingSword();
                 }
             }
         }
     }
     UpdateSlowEffects(Time.fixedDeltaTime);
 }