コード例 #1
0
    public void initializeCards()
    {
        String            magicNum, numOne, numTwo, numThree;
        RandomizerReverse rr = gameObject.GetComponent <RandomizerReverse>();

        magicNum = PlayerPrefs.GetInt("TargetNumber").ToString();
        numOne   = PlayerPrefs.GetInt("NumberOne").ToString();
        numTwo   = PlayerPrefs.GetInt("NumberTwo").ToString();
        numThree = PlayerPrefs.GetInt("NumberThree").ToString();

        numberOne.GetComponent <CanvasGroup>().alpha = 1f;
        numberOne.GetComponent <Drag>().active       = true;

        numberTwo.GetComponent <CanvasGroup>().alpha = 1f;
        numberTwo.GetComponent <Drag>().active       = true;

        numberThree.GetComponent <CanvasGroup>().alpha = 1f;
        numberThree.GetComponent <Drag>().active       = true;

        magicNumber.GetComponentInChildren <Text>().text = magicNum;
        numberOne.GetComponentInChildren <Text>().text   = numOne;;
        numberTwo.GetComponentInChildren <Text>().text   = numTwo;
        numberThree.GetComponentInChildren <Text>().text = numThree;

        answerOne.GetComponentInChildren <Text>().text   = "";
        answerTwo.GetComponentInChildren <Text>().text   = "";
        answerThree.GetComponentInChildren <Text>().text = "";
        answerFour.GetComponentInChildren <Text>().text  = "";
        answerFive.GetComponentInChildren <Text>().text  = "";
        rr.GenButton();
    }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        countInTime = 3;
        StartCoroutine(countIn());
        RandomizerReverse rr = gameObject.GetComponent <RandomizerReverse>();

        rr.GenButton();
    }