コード例 #1
0
        public virtual void GetObjectBuilder(MyObjectBuilder_CubeGrid ob)
        {
            ob.DampenersEnabled = ThrustSystem.DampenersEnabled;

            ConveyorSystem.SerializeLines(ob.ConveyorLines);
            if (ob.ConveyorLines.Count == 0)
            {
                ob.ConveyorLines = null;
            }

            if (WheelSystem != null)
            {
                ob.Handbrake = WheelSystem.HandBrake;
            }

            if (MySession.Static.Settings.EnableOxygen)
            {
                ob.OxygenAmount = OxygenSystem.GetOxygenAmount();
            }

            if (MyPerGameSettings.EnableJumpDrive)
            {
                ob.JumpDriveDirection = JumpSystem.GetJumpDriveDirection();
                ob.JumpElapsedTicks   = JumpSystem.GetJumpElapsedTicks();
            }
        }
コード例 #2
0
 public virtual void UpdateBeforeSimulation100()
 {
     if (MySession.Static.Settings.EnableOxygen)
     {
         OxygenSystem.UpdateBeforeSimulation100();
     }
 }
コード例 #3
0
        public virtual void UpdateBeforeSimulation()
        {
            ProfilerShort.Begin("Thrusters and gyro");
            ThrustSystem.UpdateBeforeSimulation();
            GyroSystem.UpdateBeforeSimulation();
            ProfilerShort.End();

            if (MyFakes.ENABLE_WHEEL_CONTROLS_IN_COCKPIT)
            {
                ProfilerShort.Begin("Wheels");
                WheelSystem.UpdateBeforeSimulation();
                ProfilerShort.End();
            }

            ProfilerShort.Begin("Conveyors");
            ConveyorSystem.UpdateBeforeSimulation();
            ProfilerShort.End();

            ProfilerShort.Begin("Control");
            ControlSystem.UpdateBeforeSimulation();
            ProfilerShort.End();

            ProfilerShort.Begin("Cameras");
            CameraSystem.UpdateBeforeSimulation();
            ProfilerShort.End();

            if (MySession.Static.Settings.EnableOxygen)
            {
                ProfilerShort.Begin("Oxygen");
                OxygenSystem.UpdateBeforeSimulation();
                ProfilerShort.End();
            }
        }
コード例 #4
0
        public virtual void Init(MyObjectBuilder_CubeGrid builder)
        {
            ThrustSystem.DampenersEnabled = builder.DampenersEnabled;

            if (WheelSystem != null)
            {
                WheelSystem.HandBrake = builder.Handbrake;
            }

            if (MySession.Static.Settings.EnableOxygen)
            {
                OxygenSystem.Init(builder.OxygenAmount);
            }
        }
コード例 #5
0
        public virtual void DebugDraw()
        {
            if (MyDebugDrawSettings.DEBUG_DRAW_GRID_TERMINAL_SYSTEMS)
            {
                MyRenderProxy.DebugDrawText3D(m_cubeGrid.WorldMatrix.Translation, TerminalSystem.GetHashCode().ToString(), Color.NavajoWhite, 1.0f, false);
            }

            if (MyDebugDrawSettings.DEBUG_DRAW_CONVEYORS)
            {
                ConveyorSystem.DebugDraw(m_cubeGrid);
                ConveyorSystem.DebugDrawLinePackets();
            }

            if (MySession.Static.Settings.EnableOxygen && MyDebugDrawSettings.DEBUG_DRAW_OXYGEN)
            {
                OxygenSystem.DebugDraw();
            }
        }
コード例 #6
0
        public virtual void Init(MyObjectBuilder_CubeGrid builder)
        {
            ThrustSystem.DampenersEnabled = builder.DampenersEnabled;

            if (WheelSystem != null)
            {
                WheelSystem.HandBrake = builder.Handbrake;
            }

            if (MySession.Static.Settings.EnableOxygen)
            {
                OxygenSystem.Init(builder.OxygenAmount);
            }

            if (MyPerGameSettings.EnableJumpDrive)
            {
                JumpSystem.Init(builder.JumpDriveDirection, builder.JumpElapsedTicks);
            }
        }
コード例 #7
0
        public virtual void GetObjectBuilder(MyObjectBuilder_CubeGrid ob)
        {
            ob.DampenersEnabled = ThrustSystem.DampenersEnabled;

            ConveyorSystem.SerializeLines(ob.ConveyorLines);
            if (ob.ConveyorLines.Count == 0)
            {
                ob.ConveyorLines = null;
            }

            if (WheelSystem != null)
            {
                ob.Handbrake = WheelSystem.HandBrake;
            }

            if (MySession.Static.Settings.EnableOxygen)
            {
                ob.OxygenAmount = OxygenSystem.GetOxygenAmount();
            }
        }