コード例 #1
0
ファイル: ShipMove.cs プロジェクト: rohunb/ThrustersPrototype
 void FireTopThrusters(float thrustForce, float amount)
 {
     for (int i = 0; i < topRearThrusters.Length; i++)
     {
         thruster = topRearThrusters[i].GetComponent<ThrusterForce>();
         if (!thruster.damaged)
         {
             thruster.maxThrustForce = thrustForce;
             thruster.thrustAmount = amount;
             thruster.FireThruster();
         }
     }
     for (int i = 0; i < topFwdThrusters.Length; i++)
     {
         thruster = topFwdThrusters[i].GetComponent<ThrusterForce>();
         if (!thruster.damaged)
         {
             thruster.maxThrustForce = thrustForce;
             thruster.thrustAmount = amount;
             thruster.FireThruster();
         }
     }
 }
コード例 #2
0
ファイル: ShipMove.cs プロジェクト: rohunb/ThrustersPrototype
 void FireReverseThrusters(float force, float amount)
 {
     for (int i = 0; i < reverseThrusters.Length; i++)
     {
         thruster = reverseThrusters[i].GetComponent<ThrusterForce>();
         if (!thruster.damaged)
         {
             thruster.maxThrustForce = force * amount;
             thruster.thrustAmount = amount;
             thruster.FireThruster();
         }
     }
 }
コード例 #3
0
ファイル: ShipMove.cs プロジェクト: rohunb/ThrustersPrototype
 private void FireBottomRearThrusters(float thrustForce, float amount)
 {
     for (int i = 0; i < bottomRearThrusters.Length; i++)
     {
         thruster = bottomRearThrusters[i].GetComponent<ThrusterForce>();
         if (!thruster.damaged)
         {
             thruster.maxThrustForce = thrustForce;
             thruster.thrustAmount = amount;
             thruster.FireThruster();
         }
     }
 }
コード例 #4
0
ファイル: ShipMove.cs プロジェクト: rohunb/ThrustersPrototype
 void FireForwardRightThrusters(float thrustForce, float amount)
 {
     for (int i = 0; i < forwardRightThrusters.Length; i++)
     {
         thruster = forwardRightThrusters[i].GetComponent<ThrusterForce>();
         if (!thruster.damaged)
         {
             thruster.maxThrustForce = thrustForce;
             thruster.thrustAmount = amount;
             thruster.FireThruster();
         }
     }
 }
コード例 #5
0
 void FireReverseThrusters(float amount)
 {
     for (int i = 0; i < AIReverseThrusters.Length; i++)
     {
         AIThruster = AIReverseThrusters[i].GetComponent<ThrusterForce>();
         if (!AIThruster.damaged)
         {
             AIThruster.maxThrustForce = revThrustForce * amount;
             AIThruster.FireThruster();
         }
     }
 }