public void TestThrusterMinStrength() { ThrusterModel t = new ThrusterModel(); t.setStrength(0); Assert.AreEqual(10, t.GetForce()); }
public void TestThrusterTestForce() { ThrusterModel t = new ThrusterModel(); t.setStrength(20); t.setPower(50f); Assert.AreEqual(1000, t.GetForce()); }
// 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); } }