Ejemplo n.º 1
0
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            rangedAttack.Attack(shotSpawn);
        }
        if (Input.GetMouseButton(0))
        {
            rangedAttack.AttackHold(shotSpawn);
        }
        if (Input.GetMouseButtonUp(0))
        {
            rangedAttack.AttackRelease(shotSpawn);
        }
        if (Input.GetMouseButtonDown(1))
        {
            meleeAnim.SetTrigger("MeleeAttack");
        }

        //goig to change this from mouse button 2 to the keyboard key R
        if (Input.GetKeyDown(KeyCode.R) == true)
        {
            rangedAttack.Reload();
        }
    }
Ejemplo n.º 2
0
    public override void InputControls()
    {
        base.InputControls();

        if (Input.GetMouseButtonDown(0))
        {
            rangedAttack.Attack(shotSpawn);
        }
        if (Input.GetMouseButton(0))
        {
            rangedAttack.AttackHold(shotSpawn);
        }
        if (Input.GetMouseButtonUp(0))
        {
            rangedAttack.AttackRelease(shotSpawn);
        }
        if (Input.GetMouseButtonDown(1))
        {
            anim.SetTrigger("MeleeAttack");
        }

        //goig to change this from mouse button 2 to the keyboard key R
        if (Input.GetKeyDown(KeyCode.R) == true)
        {
            rangedAttack.Reload();
        }
        //if(Input.GetKeyDown
    }