//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);
     }
 }
Exemple #2
0
 //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();
     }
 }
Exemple #3
0
 //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);
     }
 }
Exemple #4
0
 //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();
     }
 }