Пример #1
0
    void Awake()
    {
        if (instance != null)
        {
            Debug.LogWarning("More than one instance of extraPoints found!");
            return;
        }

        instance = this;
    }
Пример #2
0
    public void SpawnExtrapoints(int v)
    {
        extraPoints e = Instantiate(ex) as extraPoints;

        e.transform.SetParent(this.transform);


        GameObject t     = e.transform.GetChild(0).GetChild(0).gameObject;
        Text       _text = t.GetComponent <Text>();

        _text.text += v.ToString();

        /*
         * Debug.Log("El text: " + e.getText());
         * e.setText(v);
         */
    }