//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Map exits (in local coordinates) to the rooms they exit to. </summary> /// /// <remarks> Darrellp, 9/27/2011. </remarks> //////////////////////////////////////////////////////////////////////////////////////////////////// private void MapExitsToRooms() { // Clear out any current entries ExitMap.Clear(); // For each column for (int iColumn = 0; iColumn < Width; iColumn++) { // For each Row for (int iRow = 0; iRow < Height; iRow++) { // Get the current terrain character char thisCharacter = Layout[iColumn][iRow]; // Is it an exit? if (thisCharacter >= 'a' && thisCharacter <= 'z') { // Get the corresponding room's index int iRoom = thisCharacter - 'a'; // and map the location to the room it exits to ExitMap[new MapCoordinates(iColumn, iRow) + Location] = Exits[iRoom]; } } } }
void Awake() { line = GetComponent <LineRenderer>(); waypointScript = GetComponent <MoveToWaypoint>(); satScript = GetComponent <Satisfaction>(); exitMapScript = GetComponent <ExitMap>(); destination = placestoGo[Random.Range(0, 4)]; //sets the tourist destination on spawn selected = false; uiText = GameObject.FindGameObjectWithTag("Destination").GetComponent <Text>(); }
public event EnterMapHandler EnterMap; // Fires when the map is loaded protected void OnExitMap() { ExitMap?.Invoke(this); if (mapCon != null) { // reset spawn information window mapCon.ResetInfoWindow(); eq.selectedID = 99999; eq.SpawnX = -1.0f; eq.SpawnY = -1.0f; } }
public event EnterMapHandler EnterMap; // Fires when the map is loaded protected void OnExitMap() { ExitMap?.Invoke(this); if (mapCon != null) { // reset spawn information window mapCon.lblMobInfo.Text = "Spawn Information Window"; mapCon.lblMobInfo.BackColor = Color.White; mapCon.lblMobInfo.Visible = true; eq.selectedID = 99999; eq.SpawnX = -1.0f; eq.SpawnY = -1.0f; } }