Beispiel #1
0
    public void OnClick()
    {
        if(transform.parent.GetComponent<BtmInfo>().CheckSalary()){
            if(transform.parent.GetComponent<BtmInfo>().CheckFull()){
                mRegEvent = new RegEntryEvent(ReceivedEntry);
                string lineupName = transform.root.FindChild("RegisterEntry").GetComponent<RegisterEntry>().GetLineupName();
                RegisterEntry re = transform.root.FindChild("RegisterEntry").GetComponent<RegisterEntry>();

                if(transform.root.FindChild("RegisterEntry").GetComponent<RegisterEntry>().mContestInfo.myEntry < 1){
                    NetMgr.RegEntry(lineupName,
                                    transform.root.FindChild("RegisterEntry").GetComponent<RegisterEntry>().mLineup == null ? 0 :
                                    transform.root.FindChild("RegisterEntry").GetComponent<RegisterEntry>().mLineup.lineupSeq
                                    , re.GetContestSeq(), re.GetSlots(), mRegEvent);
                } else{
                    NetMgr.UpdateEntry(lineupName,
                                    transform.root.FindChild("RegisterEntry").GetComponent<RegisterEntry>().mLineup == null ? 0 :
                                    transform.root.FindChild("RegisterEntry").GetComponent<RegisterEntry>().mLineup.lineupSeq
                                       ,transform.root.FindChild("RegisterEntry").GetComponent<RegisterEntry>().mContestInfo.myEntry
                                       , re.GetContestSeq(), re.GetSlots(), mRegEvent);
                }
            } else{
                DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrError"),
                                         UtilMgr.GetLocalText("StrEntryNotEnough"), DialogueMgr.DIALOGUE_TYPE.Alert, null);
            }
        } else{
            DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrSalaryLimit"),
                                     UtilMgr.GetLocalText("StrSalaryLimit2"), DialogueMgr.DIALOGUE_TYPE.Alert, null);
        }
    }
Beispiel #2
0
    public void OnClick()
    {
        if (transform.parent.GetComponent <BtmInfo>().CheckSalary())
        {
            if (transform.parent.GetComponent <BtmInfo>().CheckFull())
            {
                mRegEvent = new RegEntryEvent(ReceivedEntry);
                string        lineupName = transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().GetLineupName();
                RegisterEntry re         = transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>();


                if (transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().mContestInfo.myEntry < 1)
                {
                    NetMgr.RegEntry(lineupName,
                                    transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().mLineup == null ? 0 :
                                    transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().mLineup.lineupSeq
                                    , re.GetContestSeq(), re.GetSlots(), mRegEvent);
                }
                else
                {
                    NetMgr.UpdateEntry(lineupName,
                                       transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().mLineup == null ? 0 :
                                       transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().mLineup.lineupSeq
                                       , transform.root.FindChild("RegisterEntry").GetComponent <RegisterEntry>().mContestInfo.myEntry
                                       , re.GetContestSeq(), re.GetSlots(), mRegEvent);
                }
            }
            else
            {
                DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrError"),
                                         UtilMgr.GetLocalText("StrEntryNotEnough"), DialogueMgr.DIALOGUE_TYPE.Alert, null);
            }
        }
        else
        {
            DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrSalaryLimit"),
                                     UtilMgr.GetLocalText("StrSalaryLimit2"), DialogueMgr.DIALOGUE_TYPE.Alert, null);
        }
    }