private void Update() { if (Input.GetMouseButtonDown(0)) { if (currentWeapon != null) { currentWeapon.Attack(); } } else if (Input.GetMouseButtonDown(1)) { if (currentWeapon != null) { currentWeapon.SecondaryAttack(); } } if (Input.GetKeyDown(KeyCode.E)) { PickupItem(); } MouseOverItem(); ManaRegen(); }
public void SecondaryAttack() { if (currentWeapon == null) { Debug.Log("[" + name + "]" + "Has no weapon to attack with!"); return; } currentWeapon.SecondaryAttack(); lastAbilityAttack = Time.time; }