예제 #1
0
        public override MyObjectBuilder_ComponentBase Serialize(bool copy = false)
        {
            MyObjectBuilder_ContainerDropComponent component1 = MyComponentFactory.CreateObjectBuilder(this) as MyObjectBuilder_ContainerDropComponent;

            component1.Competetive  = this.Competetive;
            component1.GPSName      = this.GPSName;
            component1.Owner        = this.Owner;
            component1.PlayingSound = this.m_playingSound;
            return(component1);
        }
예제 #2
0
        public override MyObjectBuilder_ComponentBase Serialize(bool copy = false)
        {
            var builder = MyComponentFactory.CreateObjectBuilder(this) as MyObjectBuilder_TimerComponent;

            builder.Repeat              = Repeat;
            builder.TimeToEvent         = TimeToEvent;
            builder.SetTimeMinutes      = m_setTimeMin;
            builder.TimerEnabled        = TimerEnabled;
            builder.RemoveEntityOnTimer = RemoveEntityOnTimer;
            return(builder);
        }
예제 #3
0
        public override MyObjectBuilder_ComponentBase Serialize(bool copy = false)
        {
            MyObjectBuilder_TimerComponent component1 = MyComponentFactory.CreateObjectBuilder(this) as MyObjectBuilder_TimerComponent;

            component1.Repeat              = this.Repeat;
            component1.TimeToEvent         = this.TimeToEvent;
            component1.SetTimeMinutes      = this.m_setTimeMin;
            component1.TimerEnabled        = this.TimerEnabled;
            component1.RemoveEntityOnTimer = this.RemoveEntityOnTimer;
            return(component1);
        }
예제 #4
0
        public override MyObjectBuilder_ComponentBase Serialize(bool copy = false)
        {
            MyObjectBuilder_UseObjectsComponent component = MyComponentFactory.CreateObjectBuilder(this) as MyObjectBuilder_UseObjectsComponent;

            component.CustomDetectorsCount = (uint)this.m_customAddedDetectors.Count;
            int index = 0;

            if (component.CustomDetectorsCount > 0)
            {
                component.CustomDetectorsMatrices = new Matrix[component.CustomDetectorsCount];
                component.CustomDetectorsNames    = new string[component.CustomDetectorsCount];
                foreach (uint num2 in this.m_customAddedDetectors)
                {
                    component.CustomDetectorsNames[index]    = this.m_detectorInteractiveObjects[num2].DetectorName;
                    component.CustomDetectorsMatrices[index] = this.m_detectorInteractiveObjects[num2].Matrix;
                    index++;
                }
            }
            return(component);
        }
예제 #5
0
        public override VRage.Game.ObjectBuilders.ComponentSystem.MyObjectBuilder_ComponentBase Serialize()
        {
            var builder = MyComponentFactory.CreateObjectBuilder(this) as MyObjectBuilder_UseObjectsComponent;

            builder.CustomDetectorsCount = (uint)m_customAddedDetectors.Count;

            int i = 0;

            if (builder.CustomDetectorsCount > 0)
            {
                builder.CustomDetectorsMatrices = new Matrix[builder.CustomDetectorsCount];
                builder.CustomDetectorsNames    = new string[builder.CustomDetectorsCount];
                foreach (var detector in m_customAddedDetectors)
                {
                    builder.CustomDetectorsNames[i]    = m_detectorInteractiveObjects[detector].DetectorName;
                    builder.CustomDetectorsMatrices[i] = m_detectorInteractiveObjects[detector].Matrix;
                    i++;
                }
            }

            return(builder);
        }