Пример #1
0
        private static void OnBuildBlocksAreaRequest(MySyncGrid sync, ref BuildBlocksAreaRequestMsg msg, MyNetworkClient sender)
        {
            Debug.Assert(sync.BlocksBuiltAreaRequest != null, "Handler should not be null, build messages will be ignored!");

            var handler = sync.BlocksBuiltAreaRequest;
            if (handler != null) handler(ref msg.Area, msg.OwnerId);
        }
Пример #2
0
 public void BuildBlocks(long ownerId, ref MyCubeGrid.MyBlockBuildArea area)
 {
     var msg = new BuildBlocksAreaRequestMsg();
     msg.GridEntityId = Entity.EntityId;
     msg.Area = area;
     msg.OwnerId = ownerId;
     Sync.Layer.SendMessageToServer(ref msg);
 }