Exemplo n.º 1
0
        public static void SendAfterGridBuilt(long builderId, long gridId)
        {
            var msg = new AfterGridCreatedMsg();

            msg.BuilderEntityId = builderId;
            msg.GridEntityId    = gridId;

            MySession.Static.SyncLayer.SendMessageToAll(ref msg);
        }
Exemplo n.º 2
0
        public static void SendAfterGridBuilt(long builderId, long gridId)
        {
            Debug.Fail("Use replication instead of this!");
            var msg = new AfterGridCreatedMsg();

            msg.BuilderEntityId = builderId;
            msg.GridEntityId    = gridId;

            MySession.Static.SyncLayer.SendMessageToAll(ref msg);
        }
Exemplo n.º 3
0
        static void OnMessageAfterGridCreated(ref AfterGridCreatedMsg msg, MyNetworkClient sender)
        {
            MyEntity   builder;
            MyEntity   gridEntity;
            MyCubeGrid grid;

            MyEntities.TryGetEntityById(msg.BuilderEntityId, out builder);
            MyEntities.TryGetEntityById(msg.GridEntityId, out gridEntity);

            grid = gridEntity as MyCubeGrid;
            Debug.Assert(grid != null, "Could not find the grid entity!");
            if (grid == null)
            {
                return;
            }

            MyCubeBuilder.AfterGridBuild(builder, grid);
        }
Exemplo n.º 4
0
        static void OnMessageAfterGridCreated(ref AfterGridCreatedMsg msg, MyNetworkClient sender)
        {
            Debug.Fail("Use replication instead of this!");
            MyEntity builder;
            MyEntity gridEntity;
            MyCubeGrid grid;
            MyEntities.TryGetEntityById(msg.BuilderEntityId, out builder);
            MyEntities.TryGetEntityById(msg.GridEntityId, out gridEntity);

            grid = gridEntity as MyCubeGrid;
            Debug.Assert(grid != null, "Could not find the grid entity!");
            if (grid == null)
            {
                return;
            }

            MyCubeBuilder.AfterGridBuild(builder, grid);
        }
Exemplo n.º 5
0
        public static void SendAfterGridBuilt(long builderId, long gridId)
        {
            Debug.Fail("Use replication instead of this!");
            var msg = new AfterGridCreatedMsg();
            msg.BuilderEntityId = builderId;
            msg.GridEntityId = gridId;

            MySession.Static.SyncLayer.SendMessageToAll(ref msg);
        }
Exemplo n.º 6
0
        public static void SendAfterGridBuilt(long builderId, long gridId)
        {
            var msg = new AfterGridCreatedMsg();
            msg.BuilderEntityId = builderId;
            msg.GridEntityId = gridId;

            MySession.Static.SyncLayer.SendMessageToAll(ref msg);
        }