void Update() { if (Input.GetKey(KeyCode.F)) { theCharacterShoot.Shooting(playerShotStartPos); } }
IEnumerator TimedShotCo() { timedShot = true; yield return(new WaitForSeconds(2f)); theCharacterShoot.Shooting(enemyShotStartPos); timedShot = false; }
// 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); } } } }