Пример #1
0
 // 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);
     }
 }
Пример #2
0
    public void TestThrusterOn()
    {
        ThrusterModel t = new ThrusterModel();

        t.setOn(true);
        Assert.IsTrue(t.isOn());
    }