//Custom void OnKeyPress(int _key) { if (_key == 0 || _key >= abilities.GetNumberOfAbilities()) { return; } abilities.AttemptSpecialAbility(_key); }
void ScanForAbilityKeyDown() { for (int keyIndex = 0; keyIndex < abilities.GetNumberOfAbilities(); keyIndex++) { if (Input.GetKeyDown(keyIndex.ToString()) && !abilities.GetRequiresTarget(keyIndex)) { abilities.AttemptSpecialAbility(keyIndex); } } }
private void ScanForAbilityKeyDown() { for (int keyIndex = 1; keyIndex < specialAbilities.GetNumberOfAbilities(); keyIndex++) { if (Input.GetKeyDown(keyIndex.ToString())) { specialAbilities.AttemptSpecialAbility(keyIndex); } } // if(Input.GetKeyDown(KeyCode.Alpha1)) // { // specialAbilities.AttemptSpecialAbility(1); // } // if(Input.GetKeyDown(KeyCode.Alpha2)) // { // specialAbilities.AttemptSpecialAbility(2); // } // if(Input.GetKeyDown(KeyCode.Alpha3)) // { // specialAbilities.AttemptSpecialAbility(3); // } }
private void ScanForAbilityKeyDown() { for (int keyIndex = 1; keyIndex < specialAbilties.GetNumberOfAbilities(); keyIndex++) { if (Input.GetKeyDown(keyIndex.ToString())) { specialAbilties.AttemptSpecialAbility(keyIndex); } } }
private void ScanForAbilityKeyDown() { for (int i = 1; i < abilities.GetNumberOfAbilities(); ++i) { if (Input.GetKeyDown(i.ToString())) { abilities.AttemptSpecialAbility(i, currentEnemy ? currentEnemy.gameObject : null); } } }
private void ScanForAbilityKeyDown() { for (int i = 0; i < abilities.GetNumberOfAbilities(); i++) { if (abilities.abilities[i] && Input.GetKeyDown(abilities.abilities[i].ButtonName)) { abilities.AttemptSpecialAbility(i); } } }
private void ScanForAbiltyKeyDown() { for (int keyIndex = 0; keyIndex <= abilities.GetNumberOfAbilities(); keyIndex++) { if (Input.GetKeyDown(keyIndex.ToString())) { abilities.UseSpecialAbilty(keyIndex); } } }