Beispiel #1
0
    private void Update()
    {
        foreach (KeyCode key in keys)
        {
            if (Input.GetKeyUp(key))
            {
                if (currentAbilities.ContainsKey(key))
                {
                    StopAllCoroutines();
                    motor.StopFollowingTarget();
                    playerCombat.EnterQueue(currentAbilities[key]);
                }
            }
        }

        if (Input.GetMouseButtonDown(1) && !currentAbilities[KeyCode.Mouse1].RequiresTarget)
        {
            StopAllCoroutines();
            motor.StopFollowingTarget();
            playerCombat.EnterQueue(currentAbilities[KeyCode.Mouse1]);
        }

        if (Input.GetKeyDown(KeyCode.Alpha0))
        {
            PlayerManager.Instance.EnableGodMode();
        }
    }
 public void UseAbility()
 {
     if (hasAbility)
     {
         playerCombat.EnterQueue(ability);
     }
 }