Beispiel #1
0
    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();
    }
Beispiel #2
0
    public void SecondaryAttack()
    {
        if (currentWeapon == null)
        {
            Debug.Log("[" + name + "]" + "Has no weapon to attack with!");
            return;
        }

        currentWeapon.SecondaryAttack();
        lastAbilityAttack = Time.time;
    }