//removes fog of war when the player first enters private void OnTriggerEnter(Collider other) { if (other.tag == "Player" && !explored) { explored = true; tileGenerator.RemoveFog(xCentre, zCentre, width, height); minimapComponent.SetActive(true); } }
//controls what happens when the player enters the room public void OnPlayerEnter() { //if being entered for the first time if (!explored) { explored = true; tileController = GameObject.Find("LevelManager").GetComponent <TileMapController>(); tileController.RemoveFog(xCentre, zCentre, width, height); GetComponent <RoomController>().AddToMiniMap(); } }
//controls what happens when the player enters the room public void OnPlayerEnter() { //if being entered for the first time if (!explored) { explored = true; tileController = GameObject.Find("LevelManager").GetComponent <TileMapController>(); tileController.RemoveFog(xCentre, zCentre, width, height); GetComponent <RoomController>().AddToMiniMap(); enemies = GameObject.Find("EnemiesList").transform; Instantiate(generator.bossRoom.mobs[0], transform.position + new Vector3(0f, 1f, 0f), Quaternion.identity, enemies); } }
//controls what happens when the player enters the room public void OnPlayerEnter() { //if being entered for the first time if (!explored) { explored = true; tileController = GameObject.Find("LevelManager").GetComponent <TileMapController>(); tileController.RemoveFog(xCentre, zCentre, width, height); roomController = gameObject.GetComponent <RoomController>(); roomController.SpawnMobs(generator.mobRoom.mobs, generator.mobRoom.mobThreatValues, extraThreatValue); enemies = GameObject.Find("EnemiesList").transform; roomController.LockDoors(); GetComponent <RoomController>().AddToMiniMap(); } }