Example #1
0
    // Use this for initialization
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        if (GameInfoChoose.currentRoundTimeLeft != 0)
        {
            timeToNextGame = GameInfoChoose.currentRoundTimeLeft;
            GameInfoChoose.currentRoundTimeLeft = 0;
        }
        else
        {
            timeToNextGame = GameInfoChoose.info.round_duration_ms;
        }

        GameInfoChoose.SetNewRound();

        scrPrWPre = previewWordObj.GetComponent <PreviewWordPrefab>();

        whatSortText = whatSortObj.GetComponent <Text>();
    }
Example #2
0
    void Awake()
    {
        objTimer.SetActive(false);

        scrTimer = objTimer.GetComponent <TimerUI>();

        scrPrWPreTop = previewWordObjTop.GetComponent <PreviewWordPrefab>();
        scrPrWPreBot = previewWordObjBot.GetComponent <PreviewWordPrefab>();

        txtWordsShown    = new Text[2];
        btnScript        = new DragUIElementCol[2];
        btnText          = new Text[2];
        txtWordsShown[0] = shownWordsObject1.GetComponentInChildren <Text>();
        txtWordsShown[1] = shownWordsObject2.GetComponentInChildren <Text>();

        txtWordsShownScore    = new Text[2];
        txtWordsShownScore[0] = shownWordScoreObj[0].GetComponent <Text>();
        txtWordsShownScore[1] = shownWordScoreObj[1].GetComponent <Text>();

        sendScore = objSendScore.GetComponent <SendScore>();

        btnText[0] = btnObject1.GetComponentInChildren <Text>();
        btnText[1] = btnObject2.GetComponentInChildren <Text>();

        btnScript[0] = btnObject1.GetComponent <DragUIElementCol>();
        btnScript[1] = btnObject2.GetComponent <DragUIElementCol>();

        userWordsChoices = new List <DragWords>();
        userChoicesGroup = new List <int>();

        structureTextObj.SetActive(true);
        structureTextObj.GetComponent <Text>().text = GameInfoDrag.info.words[GameInfoDrag.currentRound].structure_text;
    }
Example #3
0
    // Use this for initialization
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        GameInfoDrag.SetNewRound();

        scrPrWPreTop = previewWordObjTop.GetComponent <PreviewWordPrefab>();
        scrPrWPreBot = previewWordObjBot.GetComponent <PreviewWordPrefab>();

        whatSortText1 = whatSortObj1.GetComponent <Text>();
        whatSortText2 = whatSortObj2.GetComponent <Text>();

        if (GameInfoDrag.currentRoundTimeLeft != 0)
        {
            timeToNextGame = (long)GameInfoDrag.currentRoundTimeLeft;
            GameInfoDrag.currentRoundTimeLeft = 0;
        }
        else
        {
            timeToNextGame = GameInfoDrag.info.round_duration_ms;
        }
    }
Example #4
0
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        scrPrWPreTop = previewWordObjTop.GetComponent <PreviewWordPrefab>();
        scrPrWPreBot = previewWordObjBot.GetComponent <PreviewWordPrefab>();

        txtWordsShown    = new Text[2];
        btnScript        = new DragUIElement[2];
        btnText          = new Text[2];
        txtWordsShown[0] = shownWordsObject1.GetComponentInChildren <Text>();
        txtWordsShown[1] = shownWordsObject2.GetComponentInChildren <Text>();

        txtWordsShownScore    = new Text[2];
        txtWordsShownScore[0] = shownWordScoreObj[0].GetComponent <Text>();
        txtWordsShownScore[1] = shownWordScoreObj[1].GetComponent <Text>();

        sendScore = objSendScore.GetComponent <SendScore>();

        btnText[0] = btnObject1.GetComponentInChildren <Text>();
        btnText[1] = btnObject2.GetComponentInChildren <Text>();

        btnScript[0] = btnObject1.GetComponent <DragUIElement>();
        btnScript[1] = btnObject2.GetComponent <DragUIElement>();

        userWordsChoices = new List <DragWords>();
        userChoicesGroup = new List <int>();
    }
    // Use this for initialization
    void Awake()
    {
        objTimer.SetActive(false);

        GameInfoDrag.SetRoundStartInfo(GameInfoCollocation.currentGame.currentGameData, false);
        GameInfoDrag.currentRound = 0;

        GameInfoDrag.SetNewRound();

        scrPrWPreTop = previewWordObjTop.GetComponent <PreviewWordPrefab>();
        scrPrWPreBot = previewWordObjBot.GetComponent <PreviewWordPrefab>();

        whatSortText1 = whatSortObj1.GetComponent <Text>();
        whatSortText2 = whatSortObj2.GetComponent <Text>();
    }
Example #6
0
    // Use this for initialization
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        scrPrWPre = previewWordObj.GetComponent <PreviewWordPrefab>();

        choice1Text = choice1Obj.GetComponentInChildren <Text>();
        choice2Text = choice2Obj.GetComponentInChildren <Text>();
        choice3Text = choice3Obj.GetComponentInChildren <Text>();

        roundOfRound = -1;
    }
Example #7
0
    // Use this for initialization
    void Awake()
    {
        objTimer.SetActive(false);

        scrTimer = objTimer.GetComponent <TimerUI>();

        scrPrWPre = previewWordObj.GetComponent <PreviewWordPrefab>();

        choice1Text = choice1Obj.GetComponentInChildren <Text>();
        choice2Text = choice2Obj.GetComponentInChildren <Text>();
        choice3Text = choice3Obj.GetComponentInChildren <Text>();

        roundOfRound = -1;

        //GameInfoChoose.info = JsonUtility.FromJson<ChooseInfo>(GameInfoCollocation.currentGame.currentGameData);
        //GameInfoChoose.SetNewRound();
        //GameInfoChoose.currentRound = 0;

        structureTextObj.SetActive(true);
        structureTextObj.GetComponent <Text>().text = GameInfoChoose.info.words[GameInfoChoose.currentRound].structure_text;
    }
Example #8
0
    // Use this for initialization
    void Awake()
    {
        objTimer.SetActive(false);

        scrTimer = objTimer.GetComponent <TimerUI>();

        GameInfoInsert.SetRoundStartInfo(GameInfoCollocation.currentGame.currentGameData, false);

        if (GameInfoInsert.currentRoundTimeLeft != 0)
        {
            timeToNextGame = GameInfoInsert.currentRoundTimeLeft;
            GameInfoInsert.currentRoundTimeLeft = 0;
        }
        else
        {
            timeToNextGame = GameInfoInsert.info.round_duration_ms;
        }

        GameInfoInsert.SetNewRound();

        scrPrWPre = previewWordObj.GetComponent <PreviewWordPrefab>();

        whatSortText = whatSortObj.GetComponent <Text>();
    }