Example #1
0
 void Update()
 {
     if (Input.GetKey(KeyCode.F))
     {
         theCharacterShoot.Shooting(playerShotStartPos);
     }
 }
Example #2
0
    IEnumerator TimedShotCo()
    {
        timedShot = true;
        yield return(new WaitForSeconds(2f));

        theCharacterShoot.Shooting(enemyShotStartPos);
        timedShot = false;
    }
Example #3
0
 // Update is called once per frame
 void Update()
 {
     if (Input.touchCount > 0)
     {
         Touch[] myTouches = Input.touches;
         for (int i = 0; i < Input.touchCount; i++)
         {
             if (myTouches[i].position.x > Screen.width / 2)
             {
                 theCharacterShoot.Shooting(playerShotStartPos);
             }
         }
     }
 }