示例#1
0
        public override MyObjectBuilder_CubeBlock GetObjectBuilderCubeBlock(bool copy = false)
        {
            MyObjectBuilder_Cockpit objectBuilder = (MyObjectBuilder_Cockpit)base.GetObjectBuilderCubeBlock(copy);

            objectBuilder.Pilot              = (m_pilot != null && m_pilot.Save) ? (MyObjectBuilder_Character)m_pilot.GetObjectBuilder(copy) : null;
            objectBuilder.Autopilot          = (m_aiPilot != null) ? m_aiPilot.GetObjectBuilder() : null;
            objectBuilder.PilotGunDefinition = m_pilotGunDefinition;

            if (m_pilotRelativeWorld.HasValue)
            {
                objectBuilder.PilotRelativeWorld = new MyPositionAndOrientation(m_pilotRelativeWorld.Value);
            }
            else
            {
                objectBuilder.PilotRelativeWorld = null;
            }

            objectBuilder.IsInFirstPersonView = IsInFirstPersonView;
            objectBuilder.OxygenLevel         = OxygenFillLevel;

            return(objectBuilder);
        }