Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        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);
        }