void Start() { if (gm == null) { gm = GameObject.FindGameObjectWithTag("GM").GetComponent <_GM>(); } anim = elevator_0.GetComponent <Animator>(); anim.SetBool("NotInUse", true); }
void Awake() { instance = this; /*if (backMusic != null) { transform.GetComponent<AudioSource>().clip = backMusic; transform.GetComponent<AudioSource>().volume = 0.7f; }*/ }
void Awake() { if (instance == null) { instance = this; } else if (instance == this) { Destroy(gameObject); } //if (isServer) //{ //READING IN DATASETS - PRIMARILY LIST OF RANDOM NAMES int i = 0; //StreamReader inp_stm = new StreamReader(Application.dataPath + "/" + "Resources/240_animalNamesList"); StreamReader inp_stm = new StreamReader(Application.streamingAssetsPath + "//" + "240_animalNamesList"); while (!inp_stm.EndOfStream) { string inp_ln = inp_stm.ReadLine(); animalNames[i] = inp_ln; i++; } inp_stm.Close(); animalSize = animalNames.Count; animalHalf = animalSize / 2; i = 0; //inp_stm = new StreamReader(Application.dataPath + "/" + "Resources/240_adjectiveNames"); inp_stm = new StreamReader(Application.streamingAssetsPath + "//" + "240_adjectiveNames"); while (!inp_stm.EndOfStream) { string inp_ln = inp_stm.ReadLine(); inp_ln = inp_ln.Replace(" ", string.Empty); // LastName = LastName.Replace(" ", String.Empty); animalAdjectives[i] = inp_ln; i++; } inp_stm.Close(); adjectiveSize = animalAdjectives.Count; adjectiveHalf = adjectiveSize / 2; //} /*if (!isServer) * { * for (int i = 0; i < Clouds.Length; ++i) * { * //print(Clouds[i].transform.GetChild(2)); * int r = Random.Range(0, 6); * Clouds[i].transform.GetChild(2).GetComponent<MeshRenderer>().material = matColors[r]; * string name = RandomNameGenerator(); * Clouds[i].transform.GetChild(3).GetComponent<TextMeshPro>().SetText(name); * } * }*/ }
void Awake() { instance = this; /*if (backMusic != null) * { * transform.GetComponent<AudioSource>().clip = backMusic; * transform.GetComponent<AudioSource>().volume = 0.7f; * }*/ }
// Start is called before the first frame update void Start() { instance = this; }
// Start is called before the first frame update void Start() { gameManager = GameObject.Find("GameManager").GetComponent <_GM>(); }
private void Start() { hamburgerMenu.SetActive(false); gameManager = FindObjectOfType <_GM>(); }
void Start() { arOrigin = FindObjectOfType <ARSessionOrigin>(); gameManager = FindObjectOfType <_GM>(); }
// Start is called before the first frame update void Start() { auswahlPanel.SetActive(false); confirmPanel.SetActive(false); gameManager = FindObjectOfType <_GM>(); }