Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (Shooting)
     {
         Shooter.shoot();
         Shooting = false;
     }
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     rb.velocity = new Vector2(speed, 0) * Input.GetAxis("Horizontal");
     if (Input.GetKeyDown(KeyCode.Space))
     {
         shooter.shoot(rb.velocity);
     }
 }