// Start is called before the first frame update
 void Start()
 {
     simpleShoot  = GetComponent <SimpleShoot>();
     ovrGrabbable = GetComponent <OVRGrabbable>();
     bulletText   = GameObject.Find("Label Text").GetComponent <TextMeshProUGUI>();
     //bulletText.text = maxNumberOfBullet.ToString();
 }
Example #2
0
    /**
     * Executes when the character starts shooting at the player instead of moving toward them.
     * Turns Basic Shoot on so it will shoot at a constant rate.
     * */
    IEnumerator Shooting()
    {
        isShooting = true;
        SimpleShoot mySimpleShoot = GetComponent <SimpleShoot>();

        if (mySimpleShoot != null && mySimpleShoot.enabled == false)
        {
            mySimpleShoot.enabled = true;
        }

        yield return(new WaitForSeconds(timeToShoot));

        mySimpleShoot.enabled = false;
        isShooting            = false;
        yield break;
    }
Example #3
0
 // Start is called before the first frame update
 void Start()
 {
     simpleShoot = GetComponent <SimpleShoot>();
     //ovrGrabbable = GetComponent<OVRGrabbable>();
 }
Example #4
0
 // Use this for initialization
 void Start()
 {
     simpleShoot     = GetComponent <SimpleShoot>();
     ovrGrabbale     = GetComponent <OVRGrabbable>();
     bulletText.text = maxNumberOfBullets.ToString();
 }
Example #5
0
 // Start is called before the first frame update
 void Start()
 {
     simpleShoot = GetComponent <SimpleShoot>();
 }
Example #6
0
 void Start()
 {
     shootBehaviour = GetComponent <SimpleShoot>();
     grabbable      = GetComponent <OVRGrabbable>();
     audio          = GetComponent <AudioSource>();
 }