示例#1
0
        public void InitJetpackThrusts(MyCharacterDefinition definition)
        {
            m_jetpackThrusts.Clear();

            foreach (var thrustDefinition in definition.Thrusts)
            {
                int index;
                var thrustBone = m_character.FindBone(thrustDefinition.ThrustBone, out index);
                if (thrustBone != null)
                {
                    InitJetpackThrust(index, Vector3.Forward, thrustDefinition.SideFlameOffset, thrustDefinition); // UP is now in -Z
                    InitJetpackThrust(index, Vector3.Left, thrustDefinition.SideFlameOffset, thrustDefinition);
                    InitJetpackThrust(index, Vector3.Right, thrustDefinition.SideFlameOffset, thrustDefinition);
                    InitJetpackThrust(index, Vector3.Backward, thrustDefinition.SideFlameOffset, thrustDefinition); // DOWN is now in Z
                    InitJetpackThrust(index, Vector3.Up, thrustDefinition.FrontFlameOffset, thrustDefinition);      // FORWARD is now in Y
                }
            }
        }