//Classe controla o texto q aparece na tela durante o jogo // Use this for initialization void Start() { //chama metodo q separa as linhas defLinhas(); //referencia a um script que controla toda a parte de Visual Novel, incluinod o meni control = GameObject.Find("GameControl").GetComponent <Game_Control> (); //apresenta o texto na caixa de texto caixa.text = linhas[Index]; }
private void Awake() { if (instance == null) { instance = this; } else if (instance != null) { Destroy(gameObject); } }
//instando objeto, caso ele n tenha sido instanciado void Awake() { if (Instance == null) { DontDestroyOnLoad(this.gameObject); Instance = this; } else { Destroy(this.gameObject); } }
// Use this for initialization void Awake() { sliderHP1.value = startingHP1; currentHP1 = startingHP1; control = GameObject.Find("GameControl").GetComponent <Game_Control> (); }
void Start() { control = GameObject.Find("GameControl").GetComponent <Game_Control> (); }