Пример #1
0
        protected override void ExecuteUserCmd(PlayerEntity playerEntity, IUserCmd cmd)
        {
            playerEntity.stage.Value   = EPlayerLoginStage.Running;
            playerEntity.isInitialized = true;
            FreeRuleEventArgs args = (FreeRuleEventArgs)contexts.session.commonSession.FreeArgs;
            IGameRule         rule = (IGameRule)args.Rule;

            rule.PlayerEnter(contexts, playerEntity);
        }
        protected override void ExecuteUserCmd(PlayerEntity playerEntity, IUserCmd cmd)
        {
            playerEntity.stage.Value = GameRules.IsChicken(contexts.session.commonSession.RoomInfo.ModeId)
                ? EPlayerLoginStage.WaitStart
                : EPlayerLoginStage.Running;

            playerEntity.isInitialized      = true;
            playerEntity.gamePlay.CoverInit = true;
            FreeRuleEventArgs args = (FreeRuleEventArgs)contexts.session.commonSession.FreeArgs;
            IGameRule         rule = (IGameRule)args.Rule;

            rule.PlayerEnter(contexts, playerEntity);

            _logger.InfoFormat("PlayerEnter :{0}", playerEntity.entityKey);
        }