public override void RegisterGameObject(IGameObject actor, Guid context) { if (actor == null) { return; } base.RegisterGameObject(actor, context); ServerGameObject sgo = actor as ServerGameObject; MasterObjectManager.RegisterObject(sgo); if (actor is WispPlayer && OnPlayerAdded != null) { OnPlayerAdded(actor as WispPlayer); } }
public override void RemoveGameObject(IGameObject actor) { if (actor == null) { return; } ServerGameObject sgo = actor as ServerGameObject; base.RemoveGameObject(actor); MasterObjectManager.UnregisterObject(actor.UID); if (actor is WispPlayer && OnPlayerRemoved != null) { OnPlayerRemoved(actor as WispPlayer); } }
public ServerGameObjectManager(Guid context) : base(context) { MasterObjectManager.Register(this); }