Exemple #1
0
 public void SendNewMaxNumberOfBlocks(int maxNumber)
 {
     var msg = new SetMaxNumberOfBlocksMsg();
     msg.MaxNumber = maxNumber;
     msg.EntityId = m_projector.EntityId;
     Sync.Layer.SendMessageToAllAndSelf(ref msg);
 }
Exemple #2
0
 private static void OnSetMaxNumberOfBlocks(ref SetMaxNumberOfBlocksMsg msg, MyNetworkClient sender)
 {
     MyEntity projectorEntity;
     MyEntities.TryGetEntityById(msg.EntityId, out projectorEntity);
     var projector = projectorEntity as MyProjector;
     if (projector != null)
     {
         projector.OnSetMaxNumberOfBlocks(msg.MaxNumber);
     }
 }
Exemple #3
0
 private static void OnSetMaxNumberOfBlocks(ref SetMaxNumberOfBlocksMsg msg, MyNetworkClient sender)
 {
     MyEntity projectorEntity;
     MyEntities.TryGetEntityById(msg.EntityId, out projectorEntity);
     var projector = projectorEntity as MyProjector;
     if (projector != null)
     {
         projector.OnSetMaxNumberOfBlocks(msg.MaxNumber);
         if (Sync.IsServer)
         {
             Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
         }
     }
 }