protected override void OnHook()
 {
     Debug.Assert(MyMultiplayer.Static != null, "Should not get here without multiplayer");
     base.OnHook();
     m_propertySync = new MyPropertySyncStateGroup(this, Block.SyncType);
     m_propertySync.GlobalValidate = context => HasRights(context.ClientState.GetClient());
     Block.OnClose += (entity) => RaiseDestroyed();
 }
 protected override void OnHook()
 {
     Debug.Assert(MyMultiplayer.Static != null, "Should not get here without multiplayer");
     base.OnHook();
     m_propertySync = new MyPropertySyncStateGroup(this, Grid.SyncType);
     if (Sync.IsServer == false)
     {
         MyPlayerCollection.UpdateControl(Grid.EntityId);
     }
 }
示例#3
0
 protected override void OnHook()
 {
     base.OnHook();
     if (Inventory != null)
     {
         m_stateGroup = new MyEntityInventoryStateGroup(Inventory, Sync.IsServer);
         ((MyEntity)Inventory.Owner).OnClose  += m_destroyEntity;
         Inventory.BeforeRemovedFromContainer += (component) => OnRemovedFromContainer();
         m_propertySync = new MyPropertySyncStateGroup(this, Instance.SyncType);
     }
 }
 protected override void OnHook()
 {
     base.OnHook();
     m_propertySync = new MyPropertySyncStateGroup(this, Instance.SyncType);
 }