public void OnAddedToGroup(MyGridPhysicalGroupData group)
        {
            ControlSystem = group.ControlSystem;

            foreach (var block in m_cubeGrid.GetFatBlocks <MyShipController>())
            {
                if (block != null && block.ControllerInfo.Controller != null && block.EnableShipControl)
                {
                    ControlSystem.AddControllerBlock(block);
                }
            }

            ControlSystem.AddGrid(CubeGrid);
        }
Ejemplo n.º 2
0
        public void OnAddedToGroup(MyGridPhysicalGroupData group)
        {
            ControlSystem = group.ControlSystem;

            foreach (var block in m_cubeGrid.GetBlocks())
            {
                if (block.FatBlock == null)
                {
                    continue;
                }

                var controllerBlock = block.FatBlock as MyShipController;
                if (controllerBlock != null && controllerBlock.ControllerInfo.Controller != null && controllerBlock.EnableShipControl)
                {
                    ControlSystem.AddControllerBlock(controllerBlock);
                }
            }

            ControlSystem.AddGrid(CubeGrid);
        }