Ejemplo n.º 1
0
        public virtual void Init(MyObjectBuilder_CubeGrid builder)
        {
            var thrustComp = CubeGrid.Components.Get <MyEntityThrustComponent>();

            if (thrustComp != null)
            {
                thrustComp.DampenersEnabled = builder.DampenersEnabled;
            }

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

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

            if (MyPerGameSettings.EnableJumpDrive)
            {
                JumpSystem.Init(builder.JumpDriveDirection, builder.JumpRemainingTime);
            }

            var thrustComponent = CubeGrid.Components.Get <MyEntityThrustComponent>();

            if (thrustComponent != null)
            {
                thrustComponent.MergeAllGroupsDirty();
            }
        }
Ejemplo n.º 2
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);
            }
        }
Ejemplo n.º 3
0
        public virtual void Init(MyObjectBuilder_CubeGrid builder)
        {
            var thrustComp = CubeGrid.Components.Get <MyEntityThrustComponent>();

            if (thrustComp != null)
            {
                thrustComp.DampenersEnabled = builder.DampenersEnabled;
            }

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

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

            if (MyPerGameSettings.EnableJumpDrive)
            {
                JumpSystem.Init(builder.JumpDriveDirection, builder.JumpElapsedTicks);
            }
        }