// Start is called before the first frame update void Start() { beginningMusic.Play(); djs = GameObject.Find("PlayerStatsObject").GetComponent <DungeonJuiceScript>(); if (djs == null) { Debug.Log("Error: PlayerStatus could not find object \"DungeonJuiceScript\"."); } hbs = GameObject.Find("PlayerStatsObject").GetComponent <HealthBarScript>(); if (hbs == null) { Debug.Log("Error: PlayerStatus could not find object \"HealthBarScript\"."); } }
// Start is called before the first frame update void Start() { controls = GameObject.Find("Controls"); spriteRenderer = this.gameObject.GetComponent <SpriteRenderer>(); currentRoom = GameObject.Find("StartRoom"); currentRoom.GetComponent <RoomScript>().SetHomeStatus(true); djs = GameObject.Find("PlayerStatsObject").GetComponent <DungeonJuiceScript>(); rb = GetComponent <Rigidbody2D>(); home = GameObject.Find("StartRoom"); djs = GameObject.Find("PlayerStatsObject").GetComponent <DungeonJuiceScript>(); if (djs == null) { Debug.Log("Error: PlayerStatus could not find object \"DungeonJuiceScript\"."); } pentagram = GameObject.Find("Pentagram"); if (pentagram == null) { Debug.Log("Error: PlayerStatus could not find object \"Pentagram\"."); } ds = GameObject.Find("Darkness").GetComponent <Darkness>(); if (ds == null) { Debug.Log("Error: Darkness (script) could not find object \"Darkness\"."); } lightLevels = new GameObject[5]; lightLevels[0] = GameObject.Find("circle1"); if (lightLevels[0] == null) { Debug.Log("Error: PlayerStatus could not find object \"circle1\"."); } lightLevels[1] = GameObject.Find("circle2"); if (lightLevels[1] == null) { Debug.Log("Error: PlayerStatus could not find object \"circle2\"."); } lightLevels[2] = GameObject.Find("circle3"); if (lightLevels[2] == null) { Debug.Log("Error: PlayerStatus could not find object \"circle3\"."); } lightLevels[3] = GameObject.Find("circle4"); if (lightLevels[3] == null) { Debug.Log("Error: PlayerStatus could not find object \"circle4\"."); } lightLevels[4] = GameObject.Find("circle5"); if (lightLevels[4] == null) { Debug.Log("Error: PlayerStatus could not find object \"circle5\"."); } lightLevels[0].SetActive(false); lightLevels[1].SetActive(false); lightLevels[2].SetActive(false); lightLevels[3].SetActive(false); lightLevels[4].SetActive(false); }