// Update is called once per frame void FixedUpdate() { //If the thruster is switched on if (truster.isOn()) { //Apply force in the direction the thrusters facing at position(Fire the thruster) rbody.AddForceAtPosition((-transform.forward) * truster.GetForce(), transform.position); // truster.setOn(false); } }
public void TestThrusterOn() { ThrusterModel t = new ThrusterModel(); t.setOn(true); Assert.IsTrue(t.isOn()); }