예제 #1
0
        private void FireDashJets(Mech mech)
        {
            if (fuel < Type.FuelUsage) return;

            fuel -= Type.FuelUsage;

            Vec3 vel = mech.PhysicsModel.GetBody("mainBody").Rotation.GetForward();

            vel = vel.GetNormalize() * Type.Velocity;

            mech.PhysicsModel.GetBody("mainBody").LinearVelocity = vel;
        }
예제 #2
0
        private void FireFlyJets(Mech mech)
        {
            if (fuel < Type.FuelUsage || !keepFlying)
            {
                keepFlying = false;
                return;
            }

            fuel -= Type.FuelUsage;

            Vec3 vel = mech.MainGun.Rotation.GetForward();

            vel = vel.GetNormalize() * Type.Velocity;

            //mech.PhysicsModel.Bodies[0].LinearVelocity = vel;
            mech.PhysicsModel.Bodies[0].AddForce(ForceType.GlobalAtLocalPos, 0, 1000f * vel, Position);
        }
예제 #3
0
        private void FireJumpJets(Mech mech)
        {
            //mech.PhysicsModel.Bodies[0].AddForce(ForceType.GlobalAtGlobalPos, TickDelta, Vec3.ZAxis*Type.Force, mech.Position);
            //mech.PhysicsModel.Bodies[0].AddForce(ForceType.GlobalAtGlobalPos, TickDelta, Vec3.ZAxis * 2500f, mech.Position);

            if (fuel < Type.Fuel) return;

            fuel = 0f;

            Vec3 vel = mech.PhysicsModel.Bodies[0].LinearVelocity;

            vel.Z = Type.Velocity;
            mech.PhysicsModel.Bodies[0].LinearVelocity = vel;
        }