Beispiel #1
0
    void                PopGuiText(string scoreText, GameObject GO)
    {
        GameObject clone;

        clone = (GameObject)Instantiate(guiText, GO.transform.position, Quaternion.identity);

        script_text cloneComponent = (script_text)clone.GetComponent(typeof(script_text));

        cloneComponent.SetScoreText(scoreText);
    }
    void PopGuiText(string scoreText)
    {
        Quaternion rot = Quaternion.identity;

        rot.eulerAngles = new Vector3(0, 0, 0);
        GameObject clone;

        clone = (GameObject)Instantiate(coinText, transform.position, rot);
        //clone.transform.parent = this.transform;

        script_text cloneComponent = (script_text)clone.GetComponent(typeof(script_text));

        cloneComponent.SetScoreText(scoreText);
    }