} //End Update() void CheckForInput() { Ability abilityToApply = null; if ((Input.GetMouseButtonDown(0)) && (IsAbilityUsable(player, player.abilityOne))) { abilityToApply = player.abilityOne; } else if ((Input.GetMouseButtonDown(1)) && (IsAbilityUsable(player, player.abilityTwo))) { abilityToApply = player.abilityTwo; } else if ((Input.GetKeyDown(KeyCode.LeftShift)) && (IsAbilityUsable(player, player.abilityThree))) { abilityToApply = player.abilityThree; } if (abilityToApply != null) { player.currentAbility = abilityToApply; if (abilityToApply.instantCast) { abilityToApply.AbilityMap(); } else { abilityToApply.InitCharge(); } } } //End CheckForInput()