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; } }
public void ApplyMovement() { rock.GetComponent <Rigidbody2D> ().velocity = movement; }