コード例 #1
0
        public override void OnRegistered_EventHandler(object Sender, RegEngineData evntData)
        {
            base.OnRegistered_EventHandler(Sender, evntData);

            var gameRoom = Owner as IGameRoom;

            if (gameRoom == null)
            {
                throw new Exception("Wrong room type");
            }

            gameRoom.OnNewGameStatus      += OnNewGameStatus_Handler;
            gameRoom.OnNotifyJoinedPlayer += OnNotifyJoinedPlayer_Handler;
            gameRoom.OnNotifyStartGame    += NotifyStartGame_Handler;
        }
コード例 #2
0
        public virtual void OnRegistered_EventHandler(object Sender, RegEngineData evntData)
        {
            Owner = evntData.EngineOwner;

            var addrHolder = Owner as IAddressseeHolderBase;

            if (addrHolder != null)
            {
                addrHolder.OnNewAddresssee        += OnNewAddresssee_Handler;
                addrHolder.OnAddressseeHolderFull += OnAddressseeHolderFull_Handler;
            }

            Owner.OnNetProcessorBeforStarted += OnBeforNetProcStarted_EventHandler;
            Owner.OnNetProcessorStarted      += OnNetProcStarted_EventHandler;
        }