void ScanForAbilityKeyDown() { for (int keyIndex = 1; keyIndex <= abilities.GetNumbersOfAbilities(); keyIndex++) { if (Input.GetKeyDown(keyIndex.ToString())) { abilities.AttemptSpecialAbility(keyIndex); } } }
private void OnMouseOverEnemy(EnemyAI enemyAi) { if (Input.GetMouseButton(0) && IsTargetInRange(enemyAi.gameObject)) { _weaponSystem.SetAndAttackTarget(enemyAi.gameObject); } if (Input.GetMouseButton(0) && !IsTargetInRange(enemyAi.gameObject)) { StartCoroutine(MoveAndAttack(enemyAi.gameObject)); } if (Input.GetMouseButtonDown(1) && IsTargetInRange(enemyAi.gameObject)) { _powerAttackAbilityIndex = 2; _specialAbilities.AttemptSpecialAbility(_powerAttackAbilityIndex, enemyAi.gameObject); } if (Input.GetMouseButton(1) && !IsTargetInRange(enemyAi.gameObject)) { StartCoroutine(MoveAndPowerAttack(enemyAi.gameObject)); } }