Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        if (type == WordType.NOUN)
        {
            word = TextManager.getRandomNoun();
        }
        else
        {
            word = TextManager.getRandomAjective();
        }

        // Getting the Text object this script is attached to.
        textObj = this.GetComponent <Text> ();

        textObj.text = word;

        // Finding the Canvas (cause there should only be one) and getting the InsultManager class from it
        insultManagerRef = GameObject.FindObjectOfType <Canvas>().GetComponent("InsultManager") as InsultManager;

        //Debug.Log ("igRef name = " + igRef.name);
    }
Esempio n. 2
0
    // Start is called before the first frame update

    private void Awake()
    {
        instance = this;
    }