IEnumerator checkState() { bool _send = false; while (_currentState != null) { yield return(new WaitForSeconds(1)); //Debug.Log ("checkState(_currentState=" + _currentState+")"); if (_currentState is LoopState_AskHandleTsumoHai //|| _currentState is LoopState_AskSelectSuteHai || _currentState is LoopState_AskHandleSuteHai ) { //MahjongMain owner = (_currentState as GameStateBase).logicOwner; MahjongMain owner = mahjong; Player pl = owner.ActivePlayer; if (_savepl != pl) { _savepl = pl; waitTime = MaxWaitTime; _send = false; } //Debug.Log ("!!!!!!!!!!!!!!!"); // 等待 MaxWaitTime秒 回應 if (waitTime > 0) { waitTime--; if (!_send && waitTime <= 10) { //Debug.Log (_currentState+"!!!" + waitTime); EventManager.Instance.RpcSendEvent(UIEventType.Display_Countdown_Panel, waitTime); _send = true; } } else { //waitTime = MaxWaitTime; //_send = false; _savepl = null; handleNoResponse(); } } } }
protected virtual void Awake() { owner = GetComponent <GameManager>(); logicOwner = owner.LogicMain; }
protected virtual void Awake() { owner = GameManager.Instance; logicOwner = owner.GetLogicOwner(); }
void Awake() { _instance = this; mahjong = new MahjongMain(); //EventManager.Instance.AddObserver(this); }
void Awake() { _instance = this; _mahjong = new MahjongMain(); }