Пример #1
0
 void CheckSpellsDash()
 {
     if (Application.platform == RuntimePlatform.WindowsPlayer ||
         Application.platform == RuntimePlatform.LinuxPlayer ||
         Application.platform == RuntimePlatform.WindowsEditor ||
         Application.platform == RuntimePlatform.LinuxEditor)
     {
         if (Input.GetKeyDown(KeyCode.LeftShift) && canDash)
         {
             Debug.Log("isDashing");
             Dash();
             StartCoroutine(PcCooldownDash(dashCooldown));
         }
     }
     else
     {
         if (buttonDash.isPressed())
         {
             Dash();
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Checa se algum botão de feitiço foi pressionado
 /// </summary>
 void CheckSpellsFireball()
 {
     if (Application.platform == RuntimePlatform.WindowsPlayer ||
         Application.platform == RuntimePlatform.LinuxPlayer ||
         Application.platform == RuntimePlatform.WindowsEditor ||
         Application.platform == RuntimePlatform.LinuxEditor)
     {
         if (Input.GetMouseButtonUp(0) && canFire)
         {
             CmdCastFireball();
             StartCoroutine(PcCooldownFireball(fireballCooldown));
         }
     }
     else
     {
         if (buttonFireball.isPressed())
         {
             CmdCastFireball();
         }
     }
 }