Exemple #1
0
        // Gamelogic initialization
        public override void Init(MyObjectBuilder_EntityBase objectBuilder)
        {
            // Update each frame, note this may not work for all object's types!
            Entity.NeedsUpdate |= MyEntityUpdateEnum.EACH_FRAME;

            block = Entity as BlockModAPIType;
            if (block == null || MyAPIGateway.Session == null) return;

            BlockInit();

            active = true;
        }
Exemple #2
0
        // Gamelogic initialization
        public override void Init(MyObjectBuilder_EntityBase objectBuilder)
        {
            // Update each frame, note this may not work for all object's types!
            Entity.NeedsUpdate |= MyEntityUpdateEnum.EACH_FRAME;

            block = Entity as BlockModAPIType;
            if (block == null || MyAPIGateway.Session == null)
            {
                return;
            }

            BlockInit();

            active = true;
        }
Exemple #3
0
 // Gamelogic close when the block gets deleted
 public override void Close()
 {
     block = null;
 }
Exemple #4
0
 // Gamelogic close when the block gets deleted
 public override void Close()
 {
     block = null;
 }