Пример #1
0
    private void Start()
    {
        text   = gameObject.GetComponent <TextMesh>();
        script = transform.parent.GetComponent <ButtonCanvasScript>();

        if (type == TypeButton.QUIT)
        {
            text.text = "Quit";
        }
        else if (type == TypeButton.RESTART)
        {
            text.text = "Restart";
        }
        else if (type == TypeButton.RESUME)
        {
            text.text = "Resume";
        }
    }
Пример #2
0
 public void Start()
 {
     playerUIScript = Instantiate (playerUI).GetComponent< ButtonCanvasScript>();//AnotherButtonCanvasScript>();//<ButtonCanvasScript> ();
     playerUIScript.gameObject.SetActive (false);
     playerUIScript.SetPlayer (this);
 }