Example #1
0
    void OpenBetWindow(string name)
    {
        mSprBetting.SetActive(true);
        mSprBetting.GetComponent <ScriptBetting> ().Init(name);

        UtilMgr.SetBackEvent(
            new EventDelegate(mSprBetting.GetComponent <ScriptBetting> (),
                              "CloseWindow"));
    }
Example #2
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"));
    }
Example #3
0
    public void BtnClicked(string name)
    {
        UtilMgr.SetBackEvent(new EventDelegate(this, "Init"));
        switch (name)
        {
        case "BtnFacebook":
            OpenFacebook();
            break;

        case "BtnKakao":
            OpenKakao();
            break;

        case "BtnEmail":
            OpenEmail();
            break;
        }
    }
Example #4
0
    public void OpenBetting(QuizInfo quizInfo)
    {
                #if (UNITY_EDITOR)
                #elif (UNITY_ANDROID)
                #else
                #endif

        if (UtilMgr.HasBackEvent())
        {
            UtilMgr.RunAllBackEvents();
        }
        QuizMgr.QuizInfo         = quizInfo;
        QuizMgr.IsBettingOpended = true;
        QuizMgr.JoinCount        = 0;

        UtilMgr.SetBackEvent(new EventDelegate(this, "AnimateClosing"));

        mBetting.SetActive(true);
        mBetting.GetComponent <ScriptTF_Betting> ().Init(quizInfo);

        transform.GetComponent <PlayMakerFSM> ().SendEvent("OpenBetting");
        transform.root.GetComponent <AudioSource>().PlayOneShot(mSoundOpenBet);
    }
Example #5
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;
        }
    }