Esempio n. 1
0
    public void Init()
    {
        mCanGet = 0;
        if (UtilMgr.GetLastBackState() != UtilMgr.STATE.LiveBingo)
        {
            transform.root.FindChild("LiveBingo").gameObject.SetActive(true);
            transform.root.FindChild("LiveBingo").localPosition = new Vector3(2000f, 0);
            NetMgr.JoinGame();
            mUpdateCnt      = 0;
            mBingoResponse  = null;
            mLineupResponse = null;
            mCallResponse   = null;
        }

        IsReload   = false;
        BoardOnly  = false;
        IsNotReady = false;
        IsEnded    = UserMgr.eventJoined.status.Equals("Final") ? true : false;

        ClearBoard();
        mItemDic = new Dictionary <int, ItemBingo>();
        transform.GetComponent <LiveBingoAnimation>().Init();
        transform.FindChild("Body").FindChild("Scroll View").FindChild("Board").FindChild("Sprite")
        .FindChild("NotReady").gameObject.SetActive(false);

        mBingoEvent = new GetBingoEvent(ReceivedBingo);
        NetMgr.GetBingo(UserMgr.eventJoined.gameId, mBingoEvent);
    }
Esempio n. 2
0
    void ReceivedCall()
    {
        if (mCallEvent.Response == null)
        {
            return;
        }
        mCallResponse = mCallEvent.Response;
        if (mCallResponse.data.userRewardGold > 0)
        {
            UserMgr.UserInfo.gold += mCallResponse.data.userRewardGold;
            StartCoroutine(ShowBingoResult());
        }
        else
        {
            DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("LblBingo"),
                                     string.Format(UtilMgr.GetLocalText("StrFailBingo")
                                                   , mCallResponse.data.totalRewarded
                                                   , mCallResponse.data.rewardCount)
                                     , DialogueMgr.DIALOGUE_TYPE.Alert, null);
        }

        ReloadBoard();
    }
Esempio n. 3
0
    void ReceivedCall()
    {
        if(mCallEvent.Response == null) return;
        mCallResponse = mCallEvent.Response;
        if(mCallResponse.data.userRewardGold > 0){
            UserMgr.UserInfo.gold += mCallResponse.data.userRewardGold;
            StartCoroutine(ShowBingoResult());
        } else
            DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("LblBingo"),
                                     string.Format(UtilMgr.GetLocalText("StrFailBingo")
                          , mCallResponse.data.totalRewarded
                          , mCallResponse.data.rewardCount)
                                     , DialogueMgr.DIALOGUE_TYPE.Alert, null);

        ReloadBoard();
    }
Esempio n. 4
0
    public void Init()
    {
        mCanGet = 0;
        if(UtilMgr.GetLastBackState() != UtilMgr.STATE.LiveBingo){
            transform.root.FindChild("LiveBingo").gameObject.SetActive(true);
            transform.root.FindChild("LiveBingo").localPosition = new Vector3(2000f, 0);
            NetMgr.JoinGame();
            mUpdateCnt = 0;
            mBingoResponse = null;
            mLineupResponse = null;
            mCallResponse = null;
        }

        IsReload = false;
        BoardOnly = false;
        IsNotReady = false;
        IsEnded = UserMgr.eventJoined.status.Equals("Final") ? true : false;

        ClearBoard();
        mItemDic = new Dictionary<int, ItemBingo>();
        transform.GetComponent<LiveBingoAnimation>().Init();
        transform.FindChild("Body").FindChild("Scroll View").FindChild("Board").FindChild("Sprite")
            .FindChild("NotReady").gameObject.SetActive(false);

        mBingoEvent = new GetBingoEvent(ReceivedBingo);
        NetMgr.GetBingo(UserMgr.eventJoined.gameId, mBingoEvent);
    }