Ejemplo n.º 1
0
 //save/load
 public virtual void Init(MyObjectBuilder_Trigger ob)
 {
     m_IsTrue    = ob.IsTrue;
     Message     = ob.Message;
     WwwLink     = ob.WwwLink;
     NextMission = ob.NextMission;
 }
Ejemplo n.º 2
0
        public static MyTrigger CreateInstance(MyObjectBuilder_Trigger builder)
        {
            var instance = m_objectFactory.CreateInstance(builder.TypeId);

            instance.Init(builder);
            return(instance);
        }
Ejemplo n.º 3
0
 //save/load
 public virtual void Init(MyObjectBuilder_Trigger ob)
 {
     m_IsTrue=ob.IsTrue;
     Message = ob.Message;
     WwwLink = ob.WwwLink;
     NextMission = ob.NextMission;
 }
        //OB:
        public override void Init(MyObjectBuilder_Trigger builder)
        {
            base.Init(builder);
            MyObjectBuilder_TriggerBlockDestroyed ob = (MyObjectBuilder_TriggerBlockDestroyed)builder;
            MyTerminalBlock block;

            foreach (var id in ob.BlockIds)
            {
                if (MyEntities.TryGetEntityById <MyTerminalBlock>(id, out block))
                {
                    m_blocks.Add(block, BlockState.Ok);
                }
                else
                {
                    Debug.Fail("Bad entity ID in MyObjectBuilder_TriggerBlockDestroyed");
                }
            }
            SingleMessage = ob.SingleMessage;
        }
Ejemplo n.º 5
0
 public static MyTrigger CreateInstance(MyObjectBuilder_Trigger builder)
 {
     var instance = m_objectFactory.CreateInstance(builder.TypeId);
     instance.Init(builder);
     return instance;
 }
Ejemplo n.º 6
0
 //OB:
 public override void Init(MyObjectBuilder_Trigger ob)
 {
     base.Init(ob);
     LivesLeft = ((MyObjectBuilder_TriggerLives)ob).Lives;
 }
Ejemplo n.º 7
0
 public override void Init(MyObjectBuilder_Trigger ob)
 {
     base.Init(ob);
     TargetPos = ((MyObjectBuilder_TriggerPositionLeft)ob).Pos;
     m_maxDistance2 = ((MyObjectBuilder_TriggerPositionLeft)ob).Distance2;
 }
Ejemplo n.º 8
0
 public override void Init(MyObjectBuilder_Trigger ob)
 {
     base.Init(ob);
     TargetPos      = ((MyObjectBuilder_TriggerPositionLeft)ob).Pos;
     m_maxDistance2 = ((MyObjectBuilder_TriggerPositionLeft)ob).Distance2;
 }
 //OB:
 public override void Init(MyObjectBuilder_Trigger builder)
 {
     base.Init(builder);
     MyObjectBuilder_TriggerBlockDestroyed ob = (MyObjectBuilder_TriggerBlockDestroyed)builder;
     MyTerminalBlock block;
     foreach (var id in ob.BlockIds)
     {
         if (MyEntities.TryGetEntityById<MyTerminalBlock>(id, out block))
             m_blocks.Add(block, BlockState.Ok);
         else
             Debug.Fail("Bad entity ID in MyObjectBuilder_TriggerBlockDestroyed");
     }
     SingleMessage = ob.SingleMessage;
 }
Ejemplo n.º 10
0
 //OB:
 public override void Init(MyObjectBuilder_Trigger ob)
 {
     base.Init(ob);
     LimitInSeconds = ((MyObjectBuilder_TriggerNoSpawn)ob).Limit;
 }
Ejemplo n.º 11
0
 //OB:
 public override void Init(MyObjectBuilder_Trigger ob)
 {
     base.Init(ob);
     LivesLeft = ((MyObjectBuilder_TriggerLives)ob).Lives;
 }
Ejemplo n.º 12
0
 //OB:
 public override void Init(MyObjectBuilder_Trigger ob)
 {
     base.Init(ob);
     LimitInMinutes = ((MyObjectBuilder_TriggerTimeLimit)ob).Limit;
 }
Ejemplo n.º 13
0
 //OB:
 public override void Init(MyObjectBuilder_Trigger ob)
 {
     base.Init(ob);
     LimitInSeconds = ((MyObjectBuilder_TriggerNoSpawn)ob).Limit;
 }
Ejemplo n.º 14
0
 //save/load
 public virtual void Init(MyObjectBuilder_Trigger ob)
 {
     m_IsTrue = ob.IsTrue;
     Message  = ob.Message;
 }
Ejemplo n.º 15
0
 //OB:
 public override void Init(MyObjectBuilder_Trigger ob)
 {
     base.Init(ob);
     LimitInMinutes = ((MyObjectBuilder_TriggerTimeLimit)ob).Limit;
 }