Esempio n. 1
0
 public void RunThruster(RocketScript rocket)  //dzialanie sinika
 {
     if (rocket.fuel > 0)
     {
         rocket.GetComponent <Rigidbody2D>().AddForce(rocket.transform.up * _power * Time.fixedDeltaTime);
         _running     = true;
         rocket.fuel -= fuelConsumption * Time.fixedDeltaTime;
     }
 }
Esempio n. 2
0
 public void ApplyMovement()
 {
     rock.GetComponent <Rigidbody2D> ().velocity = movement;
 }