예제 #1
0
    public void setPortTownData(PortTownReturnPacket portTownPacket)
    {
        numOfPortTowns = portTownPacket.getNumofPortTowns_actual();

        portTownCoords_minimap = new byte[numOfPortTowns, 2];
        portTownCoords_world   = new float[numOfPortTowns, 2];
        portTownYRotations     = new float[numOfPortTowns];
        portTownIcons          = new MinimapIcon[numOfPortTowns];

        PortTownIndividualPacket tempRoom;

        for (byte index = 0; index < numOfPortTowns; index++)
        {
            tempRoom = portTownPacket.getPortTownArray()[index];

            portTownCoords_minimap[index, 0] = tempRoom.getPortTownCoords_simple()[0];
            portTownCoords_minimap[index, 1] = tempRoom.getPortTownCoords_simple()[1];
            portTownCoords_world[index, 0]   = tempRoom.getPortTownCoords_upscaled()[0];
            portTownCoords_world[index, 1]   = tempRoom.getPortTownCoords_upscaled()[1];
            portTownYRotations[index]        = tempRoom.getPortTownYRotation() + 90f;

            portTownIcons[index] = new MinimapIcon(createNewIcon(portTownSprite, ParentTransform_tiles),
                                                   convertRoomCoordsToUICoords(tempRoom.getPortTownCoords_simple()[0], tempRoom.getPortTownCoords_simple()[1]),
                                                   false);
        }
    }
예제 #2
0
    public void Maximize()
    {
        isEnabledTemp = true;
        if (!isEnabled)
        {
            SetEnabledTemp(enabled: true);
        }
        Vector2 vector3 = minimapMaskT.anchorMin = (minimapMaskT.anchorMax = new Vector2(0.5f, 0.5f));

        minimapMaskT.anchoredPosition = Vector2.zero;
        minimapMaskT.sizeDelta        = new Vector2(MINIMAP_SIZE, MINIMAP_SIZE);
        minimap.sizeDelta             = minimapMaskT.sizeDelta;
        borderT.sizeDelta             = minimapMaskT.sizeDelta;
        if (minimapIcons != null)
        {
            for (int i = 0; i < minimapIcons.Length; i++)
            {
                MinimapIcon minimapIcon = minimapIcons[i];
                if (minimapIcon != null)
                {
                    minimapIcon.SetSize(GetSizeForStyle(minimapIcon.style));
                    if (minimapIcon.rotation)
                    {
                        minimapIcon.SetPointerSize(MINIMAP_POINTER_SIZE, MINIMAP_POINTER_DIST);
                    }
                }
            }
        }
        maximized = true;
    }
예제 #3
0
파일: Minimap.cs 프로젝트: rnetiks/FoxMod
 public void Maximize()
 {
     this.isEnabledTemp = true;
     if (!this.isEnabled)
     {
         this.SetEnabledTemp(true);
     }
     this.minimapMaskT.anchorMin        = this.minimapMaskT.anchorMax = new Vector2(0.5f, 0.5f);
     this.minimapMaskT.anchoredPosition = Vector2.zero;
     this.minimapMaskT.sizeDelta        = new Vector2((float)this.MINIMAP_SIZE, (float)this.MINIMAP_SIZE);
     this.minimap.sizeDelta             = this.minimapMaskT.sizeDelta;
     this.borderT.sizeDelta             = this.minimapMaskT.sizeDelta;
     if (this.minimapIcons != null)
     {
         for (int i = 0; i < this.minimapIcons.Length; i++)
         {
             MinimapIcon icon = this.minimapIcons[i];
             if (icon != null)
             {
                 icon.SetSize(this.GetSizeForStyle(icon.style));
                 if (icon.rotation)
                 {
                     icon.SetPointerSize(this.MINIMAP_POINTER_SIZE, this.MINIMAP_POINTER_DIST);
                 }
             }
         }
     }
     this.maximized = true;
 }
예제 #4
0
    public void TrackGameObjectOnMinimap(GameObject objToTrack, Color iconColor, bool trackOrientation, bool depthAboveAll = false, IconStyle iconStyle = 0)
    {
        if (minimap != null)
        {
            MinimapIcon icon;
            if (trackOrientation)
            {
                icon = MinimapIcon.CreateWithRotation(minimap, objToTrack, iconStyle, MINIMAP_POINTER_DIST);
            }
            else
            {
                icon = MinimapIcon.Create(minimap, objToTrack, iconStyle);
            }

            icon.SetColor(iconColor);
            icon.SetDepth(depthAboveAll);
            var sizeForStyle = GetSizeForStyle(iconStyle);
            if (maximized)
            {
                icon.SetSize(sizeForStyle);
                if (icon.rotation)
                {
                    icon.SetPointerSize(MINIMAP_POINTER_SIZE, MINIMAP_POINTER_DIST);
                }
            }
            else
            {
                var num = 1f - (MINIMAP_SIZE - MINIMAP_CORNER_SIZE) / MINIMAP_SIZE;
                sizeForStyle.x = Mathf.Max(sizeForStyle.x * num, sizeForStyle.x * 0.5f);
                sizeForStyle.y = Mathf.Max(sizeForStyle.y * num, sizeForStyle.y * 0.5f);
                icon.SetSize(sizeForStyle);
                if (icon.rotation)
                {
                    var a = MINIMAP_POINTER_SIZE * num;
                    a = Mathf.Max(a, MINIMAP_POINTER_SIZE * 0.5f);
                    var originDistance = (MINIMAP_POINTER_SIZE - a) / MINIMAP_POINTER_SIZE;
                    originDistance = MINIMAP_POINTER_DIST * originDistance;
                    icon.SetPointerSize(a, originDistance);
                }
            }

            if (minimapIcons == null)
            {
                minimapIcons = new[] { icon };
            }
            else
            {
                var iconArray2 = new MinimapIcon[minimapIcons.Length + 1];
                for (var i = 0; i < minimapIcons.Length; i++)
                {
                    iconArray2[i] = minimapIcons[i];
                }

                iconArray2[iconArray2.Length - 1] = icon;
                minimapIcons = iconArray2;
            }
        }
    }
예제 #5
0
파일: Minimap.cs 프로젝트: rnetiks/FoxMod
 public void TrackGameObjectOnMinimap(GameObject objToTrack, Color iconColor, bool trackOrientation, bool depthAboveAll = false, IconStyle iconStyle = 0)
 {
     if (this.minimap != null)
     {
         MinimapIcon icon;
         if (trackOrientation)
         {
             icon = MinimapIcon.CreateWithRotation(this.minimap, objToTrack, iconStyle, this.MINIMAP_POINTER_DIST);
         }
         else
         {
             icon = MinimapIcon.Create(this.minimap, objToTrack, iconStyle);
         }
         icon.SetColor(iconColor);
         icon.SetDepth(depthAboveAll);
         Vector2 sizeForStyle = this.GetSizeForStyle(iconStyle);
         if (this.maximized)
         {
             icon.SetSize(sizeForStyle);
             if (icon.rotation)
             {
                 icon.SetPointerSize(this.MINIMAP_POINTER_SIZE, this.MINIMAP_POINTER_DIST);
             }
         }
         else
         {
             float num = 1f - ((this.MINIMAP_SIZE - this.MINIMAP_CORNER_SIZE) / ((float)this.MINIMAP_SIZE));
             sizeForStyle.x = Mathf.Max((float)(sizeForStyle.x * num), (float)(sizeForStyle.x * 0.5f));
             sizeForStyle.y = Mathf.Max((float)(sizeForStyle.y * num), (float)(sizeForStyle.y * 0.5f));
             icon.SetSize(sizeForStyle);
             if (icon.rotation)
             {
                 float a = this.MINIMAP_POINTER_SIZE * num;
                 a = Mathf.Max(a, this.MINIMAP_POINTER_SIZE * 0.5f);
                 float originDistance = (this.MINIMAP_POINTER_SIZE - a) / this.MINIMAP_POINTER_SIZE;
                 originDistance = this.MINIMAP_POINTER_DIST * originDistance;
                 icon.SetPointerSize(a, originDistance);
             }
         }
         if (this.minimapIcons == null)
         {
             this.minimapIcons = new MinimapIcon[] { icon };
         }
         else
         {
             MinimapIcon[] iconArray2 = new MinimapIcon[this.minimapIcons.Length + 1];
             for (int i = 0; i < this.minimapIcons.Length; i++)
             {
                 iconArray2[i] = this.minimapIcons[i];
             }
             iconArray2[iconArray2.Length - 1] = icon;
             this.minimapIcons = iconArray2;
         }
     }
 }
예제 #6
0
    MinimapIcon CreateIcon(Transform shipTransform)
    {
        /* Add a minimap icon for this ship */
        MinimapIcon icon = Instantiate(minimapIcons[playerNum], Vector3.zero, Quaternion.identity) as MinimapIcon;

        icon.followTransform = shipTransform;
        icon.worldSize       = new Vector2(Constants.worldSize, Constants.worldSize);
        icon.transform.SetParent(minimap.transform);

        return(icon);
    }
예제 #7
0
    public void TrackGameObjectOnMinimap(GameObject objToTrack, Color iconColor, bool trackOrientation, bool depthAboveAll = false, IconStyle iconStyle = IconStyle.CIRCLE)
    {
        if (!(minimap != null))
        {
            return;
        }
        MinimapIcon minimapIcon = (!trackOrientation) ? MinimapIcon.Create(minimap, objToTrack, iconStyle) : MinimapIcon.CreateWithRotation(minimap, objToTrack, iconStyle, MINIMAP_POINTER_DIST);

        minimapIcon.SetColor(iconColor);
        minimapIcon.SetDepth(depthAboveAll);
        Vector2 sizeForStyle = GetSizeForStyle(iconStyle);

        if (maximized)
        {
            minimapIcon.SetSize(sizeForStyle);
            if (minimapIcon.rotation)
            {
                minimapIcon.SetPointerSize(MINIMAP_POINTER_SIZE, MINIMAP_POINTER_DIST);
            }
        }
        else
        {
            float num = 1f - ((float)MINIMAP_SIZE - MINIMAP_CORNER_SIZE) / (float)MINIMAP_SIZE;
            sizeForStyle.x = Mathf.Max(sizeForStyle.x * num, sizeForStyle.x * 0.5f);
            sizeForStyle.y = Mathf.Max(sizeForStyle.y * num, sizeForStyle.y * 0.5f);
            minimapIcon.SetSize(sizeForStyle);
            if (minimapIcon.rotation)
            {
                float a = MINIMAP_POINTER_SIZE * num;
                a = Mathf.Max(a, MINIMAP_POINTER_SIZE * 0.5f);
                float num2 = (MINIMAP_POINTER_SIZE - a) / MINIMAP_POINTER_SIZE;
                num2 = MINIMAP_POINTER_DIST * num2;
                minimapIcon.SetPointerSize(a, num2);
            }
        }
        if (minimapIcons == null)
        {
            minimapIcons = new MinimapIcon[1]
            {
                minimapIcon
            };
            return;
        }
        MinimapIcon[] array = new MinimapIcon[minimapIcons.Length + 1];
        for (int i = 0; i < minimapIcons.Length; i++)
        {
            array[i] = minimapIcons[i];
        }
        array[array.Length - 1] = minimapIcon;
        minimapIcons            = array;
    }
예제 #8
0
	void ShowObject(GameObject obj)
	{
		MinimapIcon foundIcon = null;

		icons.TryGetValue(obj, out foundIcon);

		if (foundIcon == null)
		{
			foundIcon = SpawnIcon(obj);
			icons.Add(obj, foundIcon);
		}
		var targetPosition = foundIcon.targetObject.transform.position;
		var iconPosition = WorldToMinimapUiPosition(targetPosition);
		foundIcon.icon.transform.localPosition = iconPosition;
		//ClampedPosition(foundIcon);
	}
예제 #9
0
	void ClampedPosition(MinimapIcon icon)
	{
		var direction = (icon.targetObject.transform.position - avatarToFollow.transform.position);

		direction.y = 0;

		/*
		 * var distance = direction.magnitude;
		 *
		 * var position = direction;
		 *
		 * if (distance > clampDistanceInMeters) {
		 *      direction = direction.normalized;
		 *      position = direction * clampDistanceInMeters;
		 * }
		 */
	}
예제 #10
0
	MinimapIcon SpawnIcon(GameObject o)
	{
		GameObject iconObject = GameObject.Instantiate(questMarker) as GameObject;

		iconObject.transform.parent = transform;
		iconObject.transform.localPosition = o.transform.position;
		iconObject.transform.localRotation = new Quaternion();

		/*
		 * iconObject.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f);
		 * iconObject.transform.localRotation = Quaternion.Euler(new Vector3(-90.0f, 0.0f, 0.0f));
		 */

		MinimapIcon newIcon = new MinimapIcon();
		newIcon.icon = iconObject;
		newIcon.targetObject = o;

		return newIcon;
	}
예제 #11
0
파일: Minimap.cs 프로젝트: rnetiks/FoxMod
 private void Update()
 {
     this.CheckUserInput();
     if (((this.isEnabled || this.isEnabledTemp) && this.minimapIsCreated) && (this.minimapIcons != null))
     {
         for (int i = 0; i < this.minimapIcons.Length; i++)
         {
             MinimapIcon icon = this.minimapIcons[i];
             if (icon == null)
             {
                 RCextensions.RemoveAt <MinimapIcon>(ref this.minimapIcons, i);
             }
             else if (!icon.UpdateUI(this.minimapOrthographicBounds, this.maximized ? ((float)this.MINIMAP_SIZE) : this.MINIMAP_CORNER_SIZE))
             {
                 icon.Destroy();
                 RCextensions.RemoveAt <MinimapIcon>(ref this.minimapIcons, i);
             }
         }
     }
 }
예제 #12
0
 private void Update()
 {
     CheckUserInput();
     if ((!isEnabled && !isEnabledTemp) || !minimapIsCreated || minimapIcons == null)
     {
         return;
     }
     for (int i = 0; i < minimapIcons.Length; i++)
     {
         MinimapIcon minimapIcon = minimapIcons[i];
         if (minimapIcon == null)
         {
             RCextensions.RemoveAt(ref minimapIcons, i);
         }
         else if (!minimapIcon.UpdateUI(minimapOrthographicBounds, maximized ? ((float)MINIMAP_SIZE) : MINIMAP_CORNER_SIZE))
         {
             minimapIcon.Destroy();
             RCextensions.RemoveAt(ref minimapIcons, i);
         }
     }
 }
예제 #13
0
    public void Minimize()
    {
        isEnabledTemp = false;
        if (!isEnabled)
        {
            SetEnabledTemp(enabled: false);
        }
        Vector2 vector2 = minimapMaskT.anchorMin = (minimapMaskT.anchorMax = Vector2.one);

        minimapMaskT.anchoredPosition = cornerPosition;
        minimapMaskT.sizeDelta        = new Vector2(MINIMAP_CORNER_SIZE, MINIMAP_CORNER_SIZE);
        minimap.sizeDelta             = minimapMaskT.sizeDelta;
        borderT.sizeDelta             = minimapMaskT.sizeDelta;
        if (minimapIcons != null)
        {
            float num = 1f - ((float)MINIMAP_SIZE - MINIMAP_CORNER_SIZE) / (float)MINIMAP_SIZE;
            float a   = MINIMAP_POINTER_SIZE * num;
            a = Mathf.Max(a, MINIMAP_POINTER_SIZE * 0.5f);
            float num2 = (MINIMAP_POINTER_SIZE - a) / MINIMAP_POINTER_SIZE;
            num2 = MINIMAP_POINTER_DIST * num2;
            for (int i = 0; i < minimapIcons.Length; i++)
            {
                MinimapIcon minimapIcon = minimapIcons[i];
                if (minimapIcon != null)
                {
                    Vector2 sizeForStyle = GetSizeForStyle(minimapIcon.style);
                    sizeForStyle.x = Mathf.Max(sizeForStyle.x * num, sizeForStyle.x * 0.5f);
                    sizeForStyle.y = Mathf.Max(sizeForStyle.y * num, sizeForStyle.y * 0.5f);
                    minimapIcon.SetSize(sizeForStyle);
                    if (minimapIcon.rotation)
                    {
                        minimapIcon.SetPointerSize(a, num2);
                    }
                }
            }
        }
        maximized = false;
    }
예제 #14
0
    //public int Rangs {get; set;}

    void Start()
    {
        raceController = FindObjectOfType <RaceController>();

        if (GetComponent <BallControlInput>() != null)
        {
            isPlayer = true;
        }
        if (GetComponent <BallControlAI>() != null)       //If ball is AI
        {
            aiRespawnTime = aiMaxRespawnTime;             //Auto respawn after 20 secs of not passing a checkpoint.
        }
        if (isInLobby)
        {
            return;
        }

        if (raceController != null)
        {
            currentCheckpoint = raceController.checkpoints[0];
            nextCheckpoint    = raceController.checkpoints[1];
            checkpointTimes   = new float[raceController.checkpoints.Length];
            if (isPlayer)
            {
                nextCheckpoint.Show();
            }
        }

        AlignCameraWithCheckpoint();
        //Debug.Log (currentCheckpoint.gameObject.name);
        GameObject  mapCamera = GameObject.Find("CameraMap");
        MinimapIcon micon     = (MinimapIcon)Instantiate(mapIcon, new Vector3(0, mapCamera.transform.position.y - 10, 0), Quaternion.Euler(90, 90, 0));

        micon.renderer.material      = mapIconMaterial;
        micon.objectToFollow         = this.gameObject;
        micon.mapCamera              = mapCamera;
        base.rigidbody.interpolation = RigidbodyInterpolation.Interpolate;
    }
예제 #15
0
파일: Minimap.cs 프로젝트: rnetiks/FoxMod
 public void Minimize()
 {
     this.isEnabledTemp = false;
     if (!this.isEnabled)
     {
         this.SetEnabledTemp(false);
     }
     this.minimapMaskT.anchorMin        = this.minimapMaskT.anchorMax = Vector2.one;
     this.minimapMaskT.anchoredPosition = this.cornerPosition;
     this.minimapMaskT.sizeDelta        = new Vector2(this.MINIMAP_CORNER_SIZE, this.MINIMAP_CORNER_SIZE);
     this.minimap.sizeDelta             = this.minimapMaskT.sizeDelta;
     this.borderT.sizeDelta             = this.minimapMaskT.sizeDelta;
     if (this.minimapIcons != null)
     {
         float num = 1f - ((this.MINIMAP_SIZE - this.MINIMAP_CORNER_SIZE) / ((float)this.MINIMAP_SIZE));
         float a   = this.MINIMAP_POINTER_SIZE * num;
         a = Mathf.Max(a, this.MINIMAP_POINTER_SIZE * 0.5f);
         float originDistance = (this.MINIMAP_POINTER_SIZE - a) / this.MINIMAP_POINTER_SIZE;
         originDistance = this.MINIMAP_POINTER_DIST * originDistance;
         for (int i = 0; i < this.minimapIcons.Length; i++)
         {
             MinimapIcon icon = this.minimapIcons[i];
             if (icon != null)
             {
                 Vector2 sizeForStyle = this.GetSizeForStyle(icon.style);
                 sizeForStyle.x = Mathf.Max((float)(sizeForStyle.x * num), (float)(sizeForStyle.x * 0.5f));
                 sizeForStyle.y = Mathf.Max((float)(sizeForStyle.y * num), (float)(sizeForStyle.y * 0.5f));
                 icon.SetSize(sizeForStyle);
                 if (icon.rotation)
                 {
                     icon.SetPointerSize(a, originDistance);
                 }
             }
         }
     }
     this.maximized = false;
 }
예제 #16
0
 public void Minimize()
 {
     this.isEnabledTemp = false;
     if (!this.isEnabled)
     {
         this.SetEnabledTemp(false);
     }
     this.minimapMaskT.anchorMin        = (this.minimapMaskT.anchorMax = Vector2.one);
     this.minimapMaskT.anchoredPosition = this.cornerPosition;
     this.minimapMaskT.sizeDelta        = new Vector2(this.MINIMAP_CORNER_SIZE, this.MINIMAP_CORNER_SIZE);
     this.minimap.sizeDelta             = this.minimapMaskT.sizeDelta;
     this.borderT.sizeDelta             = this.minimapMaskT.sizeDelta;
     if (this.minimapIcons != null)
     {
         float num  = 1f - ((float)this.MINIMAP_SIZE - this.MINIMAP_CORNER_SIZE) / (float)this.MINIMAP_SIZE;
         float num2 = this.MINIMAP_POINTER_SIZE * num;
         num2 = Mathf.Max(num2, this.MINIMAP_POINTER_SIZE * 0.5f);
         float num3 = (this.MINIMAP_POINTER_SIZE - num2) / this.MINIMAP_POINTER_SIZE;
         num3 = this.MINIMAP_POINTER_DIST * num3;
         for (int i = 0; i < this.minimapIcons.Length; i++)
         {
             MinimapIcon minimapIcon = this.minimapIcons[i];
             if (minimapIcon != null)
             {
                 Vector2 sizeForStyle = this.GetSizeForStyle(minimapIcon.Style);
                 sizeForStyle.x = Mathf.Max(sizeForStyle.x * num, sizeForStyle.x * 0.5f);
                 sizeForStyle.y = Mathf.Max(sizeForStyle.y * num, sizeForStyle.y * 0.5f);
                 minimapIcon.SetSize(sizeForStyle);
                 if (minimapIcon.Rotation)
                 {
                     minimapIcon.SetPointerSize(num2, num3);
                 }
             }
         }
     }
     this.maximized = false;
 }
예제 #17
0
 public void AddIcon(MinimapIcon icon)
 {
     this.icons[(int)icon.RenderPriority].Add(icon);
 }
예제 #18
0
    public void initializeMinimapData(SimplifiedLayoutReturnPacket simplePacket, bool[,] boolArray, PersistentData persistentData)
    {
        int simpleRoomArrayWidth  = simplePacket.getAreaWidth();
        int simpleRoomArrayHeight = simplePacket.getAreaHeight();
        int boolArrayWidth        = boolArray.GetLength(0);
        int boolArrayHeight       = boolArray.GetLength(1);

        roomExploredArray = new bool[simpleRoomArrayWidth, simpleRoomArrayHeight];

        // centerX = (simpleRoomArrayWidth-1) /2f;
        // centerY = (simpleRoomArrayHeight-1) /2f;
        centerCoords = new Vector2((simpleRoomArrayWidth - 1) / 2f, (simpleRoomArrayHeight - 1) / 2f);

        float parentScaler = 343.65f / Mathf.Max(simpleRoomArrayWidth, simpleRoomArrayHeight);

        ParentTransform_all.localScale       = new Vector3(parentScaler, parentScaler, 1f);
        ParentTransform_all.localEulerAngles = new Vector3(0f, 0f, -45f);


        borderThickness = findBorderThickness(boolArrayWidth, boolArrayHeight, 5f);


        // GameObject fullMap = createNewIcon(convertBoolArrayToMinimapSprite(boolArray, boolArrayWidth, boolArrayHeight), ParentTransform_tiles);
        GameObject fullMap = createNewIcon(applyColorArrayToMinimapSprite(persistentData.getMinimapColorArray(), boolArrayWidth, boolArrayHeight), ParentTransform_tiles);

        fullMap.GetComponent <RectTransform>().localScale = new Vector3(simpleRoomArrayWidth, -simpleRoomArrayHeight, 0f);

        // playerIcon = createNewIcon(drawCircleSprite_noBorder(playerIconRadius, color_playerIcon), ParentTransform_all);
        playerIcon = createNewIcon(drawCircleSprite_withBorder(playerIconRadius, borderThickness, color_playerIcon, color_walls), ParentTransform_all);
        //drawDoorSprite
        playerIconTransform = playerIcon.GetComponent <RectTransform>();

        itemOfInterestSprite = drawCircleSprite_noBorder(borderThickness, color_walls, color_invisible);
        doorSprite_red       = drawCircleSprite_withBorder(doorCenterRadius, borderThickness, color_doorRed, color_doorBorder);
        doorSprite_yellow    = drawCircleSprite_withBorder(doorCenterRadius, borderThickness, color_doorYellow, color_doorBorder);
        doorSprite_green     = drawCircleSprite_withBorder(doorCenterRadius, borderThickness, color_doorGreen, color_doorBorder);
        doorSprite_cyan      = drawCircleSprite_withBorder(doorCenterRadius, borderThickness, color_doorCyan, color_doorBorder);
        doorSprite_blue      = drawCircleSprite_withBorder(doorCenterRadius, borderThickness, color_doorBlue, color_doorBorder);
        doorSprite_magenta   = drawCircleSprite_withBorder(doorCenterRadius, borderThickness, color_doorMagenta, color_doorBorder);
        // portTownSprite = drawDiamondSprite_noBorder(color_explored);
        // portTownSprite = drawSquareSprite_noBorder(doorCenterRadius, color_playerIcon);
        portTownSprite = drawCircleSprite_noBorder(playerIconRadius, color_playerIcon, color_invisible2);


        // Initialize the final treasure icon:
        finalTreasureIcon = new MinimapIcon(createNewIcon(itemOfInterestSprite, ParentTransform_items),
                                            convertRoomCoordsToUICoords(simplePacket.getFinalTreasureLocation()[0], simplePacket.getFinalTreasureLocation()[1]),
                                            false);

        // Initialize all the key icons:
        bool[] hasKey = simplePacket.getHasKey();
        for (int index = 0; index < 6; index++)
        {
            if (hasKey[index])
            {
                keyIcons[index] = new MinimapIcon(createNewIcon(itemOfInterestSprite, ParentTransform_items),
                                                  convertRoomCoordsToUICoords(simplePacket.getKeyLocations()[index, 0], simplePacket.getKeyLocations()[index, 1]),
                                                  false);
            }
            else
            {
                keyIcons[index] = new MinimapIcon(createNewIcon(itemOfInterestSprite, ParentTransform_items),
                                                  convertRoomCoordsToUICoords(-2, -2),
                                                  false);
            }
        }

        // Initialize the door icons:
        numOfLockedDoors = simplePacket.getNumOfLockedDoors();
        doorIcons        = new MinimapIcon[numOfLockedDoors];
        for (int index = 0; index < numOfLockedDoors; index++)
        {
            doorIcons[index] = new MinimapIcon(createDoorIconFromID(simplePacket.getDoorColors()[index]),
                                               convertRoomCoordsToUICoords_forDoors(simplePacket.getDoorLocations()[index, 0], simplePacket.getDoorLocations()[index, 1], simplePacket.getDoorSides()[index]),
                                               false);
        }


        // exploreRoom(simplePacket.getPlayerStartingLocation()[0], simplePacket.getPlayerStartingLocation()[1]);
        // exploreRoom((byte)(simplePacket.getPlayerStartingLocation()[0]+1), simplePacket.getPlayerStartingLocation()[1]);
        // exploreRoom((byte)(simplePacket.getPlayerStartingLocation()[0]-1), simplePacket.getPlayerStartingLocation()[1]);
        // exploreRoom(simplePacket.getPlayerStartingLocation()[0], (byte)(simplePacket.getPlayerStartingLocation()[1]+1));
        // exploreRoom(simplePacket.getPlayerStartingLocation()[0], (byte)(simplePacket.getPlayerStartingLocation()[1]-1));


        byte[] startLocation = simplePacket.getPlayerStartingLocation();
        byte[] tempLocation  = new byte[2];

        exploreRoom(startLocation[0], startLocation[1]);

        if (startLocation[0] < simpleRoomArrayWidth - 1)
        {
            tempLocation[0] = (byte)(startLocation[0] + 1);
            tempLocation[1] = startLocation[1];
            if (simplePacket.getSimplifiedRoomArray()[tempLocation[0], tempLocation[1]].getIsNotEmpty())
            {
                exploreRoom(tempLocation[0], tempLocation[1]);
            }
        }

        if (startLocation[0] > 0)
        {
            tempLocation[0] = (byte)(startLocation[0] - 1);
            tempLocation[1] = startLocation[1];
            if (simplePacket.getSimplifiedRoomArray()[tempLocation[0], tempLocation[1]].getIsNotEmpty())
            {
                exploreRoom(tempLocation[0], tempLocation[1]);
            }
        }

        if (startLocation[1] < simpleRoomArrayHeight - 1)
        {
            tempLocation[0] = startLocation[0];
            tempLocation[1] = (byte)(startLocation[1] + 1);
            if (simplePacket.getSimplifiedRoomArray()[tempLocation[0], tempLocation[1]].getIsNotEmpty())
            {
                exploreRoom(tempLocation[0], tempLocation[1]);
            }
        }

        if (startLocation[1] > 0)
        {
            tempLocation[0] = startLocation[0];
            tempLocation[1] = (byte)(startLocation[1] - 1);
            if (simplePacket.getSimplifiedRoomArray()[tempLocation[0], tempLocation[1]].getIsNotEmpty())
            {
                exploreRoom(tempLocation[0], tempLocation[1]);
            }
        }
    }