Esempio n. 1
0
 private static void OnSetInstantBuilding(ref SetInstantBuildingMsg msg, MyNetworkClient sender)
 {
     MyEntity projectorEntity;
     MyEntities.TryGetEntityById(msg.EntityId, out projectorEntity);
     var projector = projectorEntity as MyProjector;
     if (projector != null)
     {
         projector.OnSetInstantBuilding(msg.Enabled);
     }
 }
Esempio n. 2
0
 private static void OnSetInstantBuilding(ref SetInstantBuildingMsg msg, MyNetworkClient sender)
 {
     MyEntity projectorEntity;
     MyEntities.TryGetEntityById(msg.EntityId, out projectorEntity);
     var projector = projectorEntity as MyProjector;
     if (projector != null)
     {
         projector.OnSetInstantBuilding(msg.Enabled);
         if (Sync.IsServer)
         {
             Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
         }
     }
 }
Esempio n. 3
0
 public void SendNewInstantBuilding(bool instantBuilding)
 {
     var msg = new SetInstantBuildingMsg();
     msg.EntityId = m_projector.EntityId;
     msg.Enabled = instantBuilding;
     Sync.Layer.SendMessageToAllAndSelf(ref msg);
 }
Esempio n. 4
0
 public void SendNewInstantBuilding(bool instantBuilding)
 {
     var msg = new SetInstantBuildingMsg();
     msg.EntityId = m_projector.EntityId;
     msg.Enabled = instantBuilding;
     Sync.Layer.SendMessageToServerAndSelf(ref msg,MyTransportMessageEnum.Request);
 }