コード例 #1
0
ファイル: Player.cs プロジェクト: unstephen/Q3
        public void Clear()
        {
            Log.Debug("Player Clear name={0}", name);
            if (stateController != null)
            {
                GameFrameworkEntry.GetModule <IFsmManager>().DestroyFsm(stateController.fsm);
                stateController = null;
            }

            if (headUI != null)
            {
                headUI.Reset();
                headUI = null;
            }
            id.Dispose();
            pos.Dispose();
            clubId.Dispose();
            if (this is PlayerOther)
            {
                RoomManager.Instance.rData.roomPlayers.Remove(this as PlayerOther);
            }

            ClearCards();
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: unstephen/Q3
        public void InitData()
        {
            state = EPlayerState.None;

            stateController = new PlayerStateController();

            //初始化玩家状态机
            stateController.Init(this, GameFrameworkEntry.GetModule <IFsmManager>(),
                                 new PlayerStateInit(),
                                 new PlayerStateEnterRoom(),
                                 new PlayerStateSeatPre(),
                                 new PlayerStateSeat(),
                                 new PlayerStateGameReady(),
                                 new PlayerStateStart(),
                                 new PlayerStateDeal(),
                                 new PlayerStatePlaying(),
                                 new PlayerStateBanker(),
                                 new PlayerStateBet(),
                                 new PlayerStateEnd(),
                                 new PlayerStateCardStyle(),
                                 new PlayerStateSettle()
                                 );
            stateController.Start <PlayerStateInit>();
        }