using UnityEngine;
using System.Collections;

public class InputGunController : MonoBehaviour {

    private GunSubController gunsub;

    void Start()
    {
        gunsub = gameObject.GetComponent<GunSubController>();
    }

    void Update()
    {
        Vector2 mousePos = (Vector2)Camera.main.ScreenToWorldPoint(Input.mousePosition);

        gunsub.AimPoint = mousePos;

        if (Input.GetMouseButtonDown(0))
            gunsub.PullTrigger();
        else if (Input.GetMouseButtonDown(1))
            gunsub.PullSecondaryTrigger();


    }
}
