コード例 #1
0
    public void TestThrusterOn()
    {
        ThrusterModel t = new ThrusterModel();

        t.setOn(true);
        Assert.IsTrue(t.isOn());
    }
コード例 #2
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);
     }
 }
コード例 #3
0
    public void TestThrusterOff()
    {
        ThrusterModel t = new ThrusterModel();

        Assert.IsFalse(t.isOn());
    }