Beispiel #1
0
 void CheckAndJoinQuiz()
 {
     if (mBetting.GetComponent <ScriptTF_Betting> ().mListJoin.Count > 0)
     {
         mJoinQuizEvent = new JoinQuizEvent(new EventDelegate(this, "CompleteJoinQuiz"));
         NetMgr.JoinQuiz(mBetting.GetComponent <ScriptTF_Betting> ().mListJoin[0], mJoinQuizEvent);
         mBetting.transform.FindChild("SprBetting")
         .GetComponent <ScriptBetting>().UpdateHitterItem(
             mBetting.GetComponent <ScriptTF_Betting> ().mListJoin[0]);
     }
 }
Beispiel #2
0
    void OnCenter(GameObject obj)
    {
        if (IsLock || IsChosen)
        {
            return;
        }

        mChoice = obj.GetComponentInParent <UIScrollView>().transform.localPosition.x > 150f ? Choice.Out
                        : obj.GetComponentInParent <UIScrollView>().transform.localPosition.x < -150f ? Choice.Base : Choice.None;

        if (mChoice == Choice.None)
        {
            return;
        }

        if (mJoinInfo.checkValue == 0)
        {
            if (mChoice == Choice.Base)
            {
                return;
            }
        }
        else if (mJoinInfo.checkValue == 1)
        {
            if (mChoice == Choice.Out)
            {
                return;
            }
        }

        IsChosen             = true;
        mJoinInfo.checkValue = mChoice == Choice.Base ? 0 : 1;

        mJoinEvent = new JoinQuizEvent(ReceivedChoice);
        NetMgr.JoinQuiz(mJoinInfo, mJoinEvent);
    }
    void OnCenter(GameObject obj)
    {
        if(IsLock || IsChosen) return;

        mChoice = obj.GetComponentInParent<UIScrollView>().transform.localPosition.x > 150f ? Choice.Out
            : obj.GetComponentInParent<UIScrollView>().transform.localPosition.x < -150f ? Choice.Base : Choice.None;

        if(mChoice == Choice.None) return;

        if(mJoinInfo.checkValue == 0){
            if(mChoice == Choice.Base) return;
        } else if(mJoinInfo.checkValue == 1){
            if(mChoice == Choice.Out) return;
        }

        IsChosen = true;
        mJoinInfo.checkValue = mChoice == Choice.Base ? 0 : 1;

        mJoinEvent = new JoinQuizEvent(ReceivedChoice);
        NetMgr.JoinQuiz(mJoinInfo, mJoinEvent);
    }