示例#1
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);

        if (isUISet)
        {
            return;
        }

        isUISet = true;
//        EProz.INSTANCE.cancelDelayCall = false;
        //   Debug.LogError("Game Staus :" + GameManager.Instance.Status.ToString());

        BoxPositions = new List <Vector2>();
        //   defaultPos = new List<Vector2>();


        //   Debug.LogError(".....Set UI Called.....");

        babushkaNo = info.QuestionData_Int[0];
        duration   = info.QuestionData_Float[0];

        for (int i = 0; i < babushkaNo; i++)
        {
            mButtonHolder[i].gameObject.SetActive(true);
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
            SetCorrectIndex(info.ButtonAnswer[i], i);
            //      Debug.Log("<color=blue>Correct Index = </color>" + correctIndex);
        }

        setAllBabushkaPos();
        setBabushka(correctIndex);
    }
示例#2
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);

        if (isUISet)
        {
            return;
        }

        isUISet = true;

//        EProz.INSTANCE.cancelDelayCall = false;

        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[i].gameObject.SetActive(true);
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
            mButtonHolder[i].gameObject.SetActive(false);
        }

        mButtonHolder[info.QuestionData_Int[0]].gameObject.SetActive(true);
        EProz.INSTANCE.WaitAndCall(DelayTime, () =>
        {
            mButtonHolder[info.QuestionData_Int[1]].gameObject.SetActive(true);
            EProz.INSTANCE.WaitAndCall(DelayTime, () =>
            {
                mButtonHolder[info.QuestionData_Int[2]].gameObject.SetActive(true);
                GameManager.Instance.SetInput();
            });
        });
    }
示例#3
0
    public override void SetUI(QuestionUIInfo info)
    {
        if (isUISet)
        {
            return;
        }

        base.SetUI(info);

        //    displayTime = info.QuestionData_Float[0];
        //   QuestionDisplay.text = info.Question;

        AnswerParent.gameObject.SetActive(false);
//      for (int i = 0; i < mButtonHolder.Count; i++)
//          mButtonHolder [i].SetAnswerButtonProperties (info.ButtonAnswer [i]);

        isUISet = true;
        //  EProz.INSTANCE.WaitAndCall(displayTime, () =>
        //     {
        order.Shuffle();
        // QuestionDisplay.text = info.SecondaryQuestion[0];
        UIManager.Instance.ShowSecondaryQuestion();

        AnswerParent.gameObject.SetActive(true);

        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[i].GetComponent <RectTransform>().anchoredPosition = positions[order[i]];
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
        }
        //     });
    }
示例#4
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);


        //Debug.LogError("Class :" + this.name);
        //   QuestionDisplay.text = info.Question;

//        EProz.INSTANCE.cancelDelayCall = false;

        Debug.Log("Number = " + GameManager.Instance.GetCurrentQuestion().QuestionData_Float[0]);
        LowerLimit = GameManager.Instance.GetCurrentQuestion().QuestionData_Float[0];  // First element contains lower Limit
        Debug.Log("LowerLimit = " + LowerLimit);
        UpperLimit  = GameManager.Instance.GetCurrentQuestion().QuestionData_Float[1]; // Second element contains Upper Limit
        MonkeySpeed = GameManager.Instance.GetCurrentQuestion().QuestionData_Float[2]; // Third element is speed duration

        setDetector();

        //Debug.Log("L limit = " + LowerLimit + "\tU Limit = " + UpperLimit);

        mAnswerButton.SetAnswerButtonProperties(info.ButtonAnswer[0]);
        StartCoroutine(MoveMonkey());
        StartCoroutine(DetectMonkey());
        isUISet = true;
    }
示例#5
0
    //    IEnumerator Monkey_poscheck()
    //    {
    //        for (int i = 0; i < 10; i++)
    //        {
    //            monkey.anchoredPosition = randomPos[i];
    //            yield return new WaitForSeconds(0.7f);
    //        }
    //    }

    public override void SetUI(QuestionUIInfo info)
    {
        InitMonkey();
        base.SetUI(info);
        //mAnswerHolder.SetAnswerButtonProperties(info.ButtonAnswer[0], true);
//        MonkeyAnim.speed = 0;
        // StartCoroutine(Monkey_Jump());
    }
    private void SetSize(AnswerButtonHolder mBtnHolder, QuestionUIInfo info, int index)
    {
        RectTransform rt = mBtnHolder.GetComponent <RectTransform>();

        Debug.Log("Index=" + index);
        //      defaultSize.Add(rt.sizeDelta);
        rt.sizeDelta *= info.QuestionData_Float[index];
    }
示例#7
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);

        // QuestionDisplay.text = info.Question;
        StartCoroutine(DisplayBalloons(info));
        isUISet = true;
    }
    protected override void Set()
    {
        List <ButtonProperties> buttons = new List <ButtonProperties> ();

        buttons.Add(new ButtonProperties(info.Options [0].Sprite, info.Options[0].SecondarySprites, info.Options [0].text, info.Options [0].ID, CorrectlyAnswered, info.Options [0].IsCorrect, info.Options[0].SequenceInfo));
        QuestionUIInfo catchMonkey = new QuestionUIInfo(info.Question, info.SecondaryQuestion, info.QuestionSprite [0], info.QuestionData_Float, info.QuestionData_Int, buttons);

        UIManager.Instance.SetUI(info.Pattern, catchMonkey);
    }
示例#9
0
 IEnumerator DisplayBalloons(QuestionUIInfo info)
 {
     for (int i = 0; i < mButtonHolders.Count; i++)
     {
         mButtonHolders[i].gameObject.SetActive(true);
         mButtonHolders[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
         yield return(new WaitForSeconds(delayTime));
     }
 }
示例#10
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);

        //QuestionDisplay.text = info.Question;

        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
        }
    }
示例#11
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);
//        EProz.INSTANCE.cancelDelayCall = false;
        // Quesion.text = info.Question;

        for (int i = 0; i < mButtonHolders.Count; i++)
        {
            mButtonHolders[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
        }
    }
示例#12
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);
//        EProz.INSTANCE.cancelDelayCall = false;
        this.Question.text  = info.Question;
        this.Q_Image.sprite = GetCorrectSpriteByID.Instance.GetSpriteFromID(info.Q_Image.Sprite);

        for (int i = 0; i < ButtonAnswer.Count; i++)
        {
            ButtonAnswer[i].SetAnswerButtonProperties(info.ButtonAnswer[i], true);
        }
    }
示例#13
0
    public override void SetUI(QuestionUIInfo info)
    {
        Debug.Log("SetUI_SpeedTouch");
//        EProz.INSTANCE.cancelDelayCall = false;
        base.SetUI(info);
        UIManager.Instance.ShowSecondaryQuestion();

        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
            mButtonHolder[i].gameObject.Show();
        }
    }
示例#14
0
    public override void SetUI(QuestionUIInfo info)
    {
        Debug.Log("------------------>This Set UI");

        base.SetUI(info);
        //QuestionDisplay.text = info.SecondaryQuestion[0];
        UIManager.Instance.ShowSecondaryQuestion();

        QPattern pattern = GameManager.Instance.GetCurrentQuestion().Pattern;

        num     = info.QuestionData_Int.Count;
        mInfo   = info;
        isUISet = true;
    }
示例#15
0
    protected override void Set()
    {
        List <ButtonProperties> buttonProperties = new List <ButtonProperties>();

        for (int i = 0; i < info.Options.Count; i++)
        {
            Action <int, int, bool, List <SequenceOfClick> > actionOnClick = info.Options[i].IsCorrect ? CorrectlyAnswered : WronglyAnswered;

            ButtonProperties button = new ButtonProperties(info.Options[i].Sprite, info.Options[i].SecondarySprites, info.Options[i].text, info.Options[i].ID, actionOnClick, info.Options[i].IsCorrect, info.Options[i].SequenceInfo);
            buttonProperties.Add(button);
        }
        QuestionUIInfo ifelse = new QuestionUIInfo(info.Question, info.SecondaryQuestion, null, info.QuestionData_Float, info.QuestionData_Int, buttonProperties);

        UIManager.Instance.SetUI(info.Pattern, ifelse);
    }
示例#16
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);
        this.info = info;
        GameManager.Instance.TimeTicker += TimerTick;
        showData1 = true;
        showData2 = true;
        checkData = true;

        data1 = info.QuestionData_Int[0];
        data2 = info.QuestionData_Int[1];

        callResetOnQuestion = data2 + 2;

        GameManager.Instance.GetCurrentQuestion().ReturnValue_Bool = false;
        isUISet = true;
    }
示例#17
0
    public override void SetUI(QuestionUIInfo info)
    {
        if (isUISet)
        {
            return;
        }

        AnswerParent.gameObject.Hide();
        base.SetUI(info);
        this.info = info;
        GameManager.Instance.TimeTicker += TimerTick;


        BaseQuestion question = GameManager.Instance.GetCurrentQuestion();


        hasQuestionStarted = true;
        displayTime        = info.QuestionData_Float[0];
        showAfterSeconds   = GameManager.Instance.timerInt + (int)displayTime;

        for (int i = 0; i < question.QuestionSprite.Count; i++)
        {
            QuestionImages[i].sprite = GetCorrectSpriteByID.Instance.GetSpriteFromID(question.QuestionSprite[i].Sprite);
        }

        QimageParent.gameObject.Show();
        isUISet = true;


        //EProz.INSTANCE.WaitAndCall(displayTime, () =>
        //{
        //QimageParent.gameObject.SetActive(false);
        ////QuestionDisplay.text = info.SecondaryQuestion [0];
        //
        //UIManager.Instance.ShowSecondaryQuestion();
        //AnswerParent.gameObject.SetActive(true);
        ////    UIManager.Instance.ShowSecondaryQuestion();
        //
        //for (int i = 0; i < mButtonHolder.Count; i++)
        //{
        //    mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
        //}
        //
        //});
    }
示例#18
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);
        QuestionDisplay.text = info.Question;

        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[i].gameObject.Show();
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
            monkeyAnimator.Add(mButtonHolder[i].transform.GetChild(0).GetComponent <Animator>());
            monkeyAnimator[i].speed = 0;
            SetSize(mButtonHolder[i]);
        }

        isUIset = true;
        CancelInvoke("animate");
        InvokeRepeating("animate", 0, 2.5f);
    }
示例#19
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);

        monkeySpeed = new List <float>();

//        EProz.INSTANCE.cancelDelayCall = false;

        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[i].gameObject.Show();
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
            monkeySpeed.Add(info.QuestionData_Float[i]);
            Debug.Log(monkeySpeed[i]);
        }

        SetSpeedMonkey();
        isUISet = true;
    }
示例#20
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);

        parent = ButtonRects[0].parent;

//        EProz.INSTANCE.cancelDelayCall = false;

        defaultPos     = new List <Vector2>();
        currentPosList = new List <Vector2>();
        //     QuestionDisplay.text = info.Question;

        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
            defaultPos.Add(ButtonRects[i].anchoredPosition);
            currentPosList.Add(ButtonRects[i].anchoredPosition);
        }
        isUISet = true;
    }
示例#21
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);

        // QuestionDisplay.text = info.Question;
        //     float orderConst = 0.7f;

        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
            mButtonHolder[i].gameObject.SetActive(false);
        }

        int index = 0;

        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[index++].gameObject.SetActive(true);
        }
    }
示例#22
0
    private void FindAndSetQuestionPanel(QPattern pattern, QuestionUIInfo info)
    {
        HideAllQuestionPanels();

        UIPanel = null;

        for (int i = 0; i < QuestionUIPanels.Count; i++)
        {
            if (QuestionUIPanels[i].Pattern == pattern)
            {
                UIPanel = QuestionUIPanels[i].Panel;
                break;
            }
        }
        if (UIPanel != null)
        {
            CurrentQuestionPanel = UIPanel;
            UIPanel.gameObject.Show();
            UIPanel.SetUI(info);
        }
    }
示例#23
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);
        if (isUISet)
        {
            return;
        }

        GameManager.Instance.TimeTicker += Ticker;

        this.info = info;

        appearTime  = info.QuestionData_Float[0];
        appearTime1 = (int)info.QuestionData_Float[0] + 1;
        appearTime2 = appearTime1 + (int)info.QuestionData_Float[0] + 1;
        appearTime3 = appearTime2 + (int)info.QuestionData_Float[0] + 1;
        swapTime    = appearTime3 + (int)info.QuestionData_Float[0] + 1;
        setOrder();
        GameManager.Instance.CanProcessInput = false;
        isUISet = true;
    }
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);

//        EProz.INSTANCE.cancelDelayCall = false;

        //    QuestionDisplay.text = info.Question;
        TotalBallNo = info.QuestionData_Int[0];
        setPositions();

        Debug.Log(TotalBallNo);

        for (int i = 0; i < TotalBallNo; i++)
        {
            mAnswerHolder[i].gameObject.SetActive(true);
            mAnswerHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
            SetSize(mAnswerHolder[i], info, i);
        }

        isUISet = true;
    }
示例#25
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);
        QPattern p = GameManager.Instance.GetCurrentQuestion().Pattern;

        //     QuestionDisplay.text = info.Question;
        if (monkey != null)
        {
            if (p != QPattern.TrueFalse)
            {
                monkey.gameObject.SetActive(false);
            }
            else
            {
                monkey.gameObject.SetActive(true);
            }
        }


        for (int i = 0; i < mButtonHolder.Count; i++)
        {
            mButtonHolder[i].SetAnswerButtonProperties(info.ButtonAnswer[i]);
        }
    }
示例#26
0
    public override void SetUI(QuestionUIInfo info)
    {
        if (isUISet)
        {
            return;
        }

        base.SetUI(info);
        isUISet = true;

        EProz.INSTANCE.WaitAndCall(7.0f, () =>
        {
            spotDiif.SetActive(false);
            Skull.SetActive(true);

            EProz.INSTANCE.WaitAndCall(2.0f, () =>
            {
                Skull.Hide();
                ScareTactic.SetActive(true);
                //UIManager.Instance.ShowSecondaryQuestion();
                Invoke("Clear", 3.0f);
            });
        });
    }
示例#27
0
    public override void SetUI(QuestionUIInfo info)
    {
        base.SetUI(info);

        //  QuestionDisplay.text = info.Question;
    }
示例#28
0
 public virtual void SetUI(QuestionUIInfo info)
 {
     StartCoroutine(EnableInput());
     ShowGamePanel();
 }
示例#29
0
 public void SetUI(QPattern pattern, QuestionUIInfo info)
 {
     FindAndSetQuestionPanel(pattern, info);
 }