Пример #1
0
    public void GotCardInven()
    {
        Debug.Log("GotCardInven");

        UtilMgr.RemoveAllBackEvents();
        AutoFade.LoadLevel("SceneTeamHome", 0f, 1f);
    }
 public void BackPressed()
 {
     nums = 0;
     UtilMgr.RemoveAllBackEvents();
     Debug.Log("Button!!!!");
     ALLBack();
 }
Пример #3
0
    void LoginFailed()
    {
        PlayerPrefs.SetString(Constants.PrefEmail, "");
        PlayerPrefs.SetString(Constants.PrefPwd, "");
        UtilMgr.RemoveAllBackEvents();
        Init();
        string title = gameObject.GetComponent <PlayMakerFSM>().FsmVariables.FindFsmString("loginFailedTitle").Value;
        string body  = gameObject.GetComponent <PlayMakerFSM>().FsmVariables.FindFsmString("loginFailedBody").Value;

        DialogueMgr.ShowDialogue(
            title, body, DialogueMgr.DIALOGUE_TYPE.Alert, "", "", "");
        UtilMgr.SetBackEvent(new EventDelegate(transform.root.GetComponent <ScriptLoginRoot>(), "DismissDialogue"));
    }
Пример #4
0
    public void BackPressed()
    {
        UtilMgr.RemoveAllBackEvents();

        StartCoroutine(Down(UiRoot.transform.FindChild("TF_Highlight").gameObject));
        StartCoroutine(Down(UiRoot.transform.FindChild("TF_Lineup").gameObject));
        StartCoroutine(Down(UiRoot.transform.FindChild("TF_Items").gameObject));
        StartCoroutine(Down(UiRoot.transform.FindChild("TF_Livetalk").gameObject));
        //			if(UiRoot.transform.FindChild("TF_Highlight").transform.localPosition.y==25){
        //			StartCoroutine(Down(UiRoot.transform.FindChild("TF_Highlight").gameObject));
        //			}else if(UiRoot.transform.FindChild("TF_Lineup").transform.localPosition.y==25){
        //				StartCoroutine(Down(UiRoot.transform.FindChild("TF_Lineup").gameObject));
        //			}else if(UiRoot.transform.FindChild("TF_Livetalk").transform.localPosition.y==25){
        //				StartCoroutine(Down(UiRoot.transform.FindChild("TF_Livetalk").gameObject));
        //			}
    }
Пример #5
0
    public void GotCardInven()
    {
        Debug.Log("GotCardInven");
        UserMgr.CardInvenInfo = mCardEvent.Response.data;

        UtilMgr.RemoveAllBackEvents();
        //        AutoFade.LoadLevel ("SceneTeamHome", 0f, 1f);
        try{
            ContestEvent = new ContestListEvent(new EventDelegate(this, "GetContest"));
            NetMgr.GetContestList(ContestEvent);
        }catch {
            HistoryEvent = new HistoryListEvent(new EventDelegate(this, "GetHistory"));
            NetMgr.GetHistoryList(HistoryEvent);
        }
        //    GetContest ();
    }
Пример #6
0
    //    public void GotSimpleResult(){
    //        if (mSimpleEvent.Response.data == null
    //            || mSimpleEvent.Response.data.Count < 1)
    //                        return;
    //
    //        mQuizInfo.quizValue = mSimpleEvent.Response.data [0].quizValue;
    //
    //        mQuizInfo.resp = new List<QuizRespInfo> ();
    //        QuizRespInfo tmpInfo;
    //        if (mSimpleEvent.Response.data.Count > 1) {
    //            //got 2 answers
    //            tmpInfo = new QuizRespInfo();
    //            tmpInfo.respValue = mSimpleEvent.Response.data[1].respValue;
    //            mQuizInfo.resp.Add(tmpInfo);
    //        }
    //
    //        tmpInfo = new QuizRespInfo();
    //        tmpInfo.respValue = mSimpleEvent.Response.data[0].respValue;
    //        mQuizInfo.resp.Insert(0, tmpInfo);
    //
    //
    //
    //        SetQuizResult (mQuizInfo);
    //    }

    public void OnClicked()
    {
        if (mMatchPlaying.mDetailOpened)
        {
            UtilMgr.RemoveAllBackEvents();
            mMatchPlaying.mDetailOpened = false;

            //            mDetailView.GetComponent<UIPanel> ().depth = 0;
            mDetailView.SetActive(false);
            mDetailView.transform.FindChild("ListDetail").gameObject.SetActive(false);            //GetComponent<UIPanel>().depth = 0;
            transform.GetComponent <UIDragScrollView>().enabled = true;
            //            if(transform.parent.GetComponent<SpringPanel> () != null)
            //                transform.parent.GetComponent<SpringPanel> ().enabled = true;
            mDetailView.GetComponent <ScriptDetailHighlight> ().ClearList();
            //            NGUITools.FindInParents<UIPanel> (gameObject).clipOffset = mClipOffsetPanel;

            Debug.Log("mLocalPosList 2 : " + mMatchPlaying.mLocalPosList.y);
            //            mMatchPlaying.ResetList(mMatchPlaying.mLocalPosList, mMatchPlaying.mClipOffsetPanel);
            //            transform.parent.localPosition = mLocalPosList;
            mMatchPlaying.mList.SetActive(true);
            mMatchPlaying.mItemHitter.SetActive(false);
        }
        else
        {
            mMatchPlaying.mDetailOpened = true;

            UtilMgr.AddBackEvent(new EventDelegate(this, "OnClicked"));
            mEvent = new GetQuizResultEvent(new EventDelegate(this, "GotResult"));
            NetMgr.GetQuizResult(mQuizInfo.quizListSeq, mEvent);
            transform.GetComponent <UIDragScrollView>().enabled = false;

            mMatchPlaying.mLocalPosList = new Vector3(transform.parent.localPosition.x, transform.parent.localPosition.y);
            Debug.Log("mLocalPosList 1 : " + mMatchPlaying.mLocalPosList.y);
            mMatchPlaying.mClipOffsetPanel = new Vector2(NGUITools.FindInParents <UIPanel> (gameObject).clipOffset.x
                                                         , NGUITools.FindInParents <UIPanel> (gameObject).clipOffset.y);
            //            mMatchPlaying.SetList(mQuizInfo);
        }
    }
Пример #7
0
//	public void GotSimpleResult(){
//		if (mSimpleEvent.Response.data == null
//		    || mSimpleEvent.Response.data.Count < 1)
//						return;
//
//		mQuizInfo.quizValue = mSimpleEvent.Response.data [0].quizValue;
//
//		mQuizInfo.resp = new List<QuizRespInfo> ();
//		QuizRespInfo tmpInfo;
//		if (mSimpleEvent.Response.data.Count > 1) {
//			//got 2 answers
//			tmpInfo = new QuizRespInfo();
//			tmpInfo.respValue = mSimpleEvent.Response.data[1].respValue;
//			mQuizInfo.resp.Add(tmpInfo);
//		}
//
//		tmpInfo = new QuizRespInfo();
//		tmpInfo.respValue = mSimpleEvent.Response.data[0].respValue;
//		mQuizInfo.resp.Insert(0, tmpInfo);
//
//
//
//		SetQuizResult (mQuizInfo);
//	}

    public void OnClicked()
    {
        if (isOpened)
        {
            UtilMgr.RemoveAllBackEvents();
            isOpened = false;
            mDetailView.GetComponent <UIPanel> ().depth = 0;
            mDetailView.transform.FindChild("ListDetail").GetComponent <UIPanel>().depth = 0;
            transform.GetComponent <UIDragScrollView>().enabled = true;
//			if(transform.parent.GetComponent<SpringPanel> () != null)
//				transform.parent.GetComponent<SpringPanel> ().enabled = true;
            mDetailView.GetComponent <ScriptDetailHighlight> ().ClearList();

            transform.parent.localPosition = mLocalPosList;
            NGUITools.FindInParents <UIPanel> (gameObject).clipOffset = mClipOffsetPanel;
        }
        else
        {
            UtilMgr.SetBackEvent(new EventDelegate(this, "OnClicked"));
            mEvent = new GetQuizResultEvent(new EventDelegate(this, "GotResult"));
            NetMgr.GetQuizResult(mQuizInfo.quizListSeq, mEvent);
            transform.GetComponent <UIDragScrollView>().enabled = false;
        }
    }
Пример #8
0
 public void BackPressed()
 {
     UtilMgr.RemoveAllBackEvents();
     //StartCoroutine(Down (transform.FindChild ("TF_Post").gameObject));
 }