예제 #1
0
 //Enables the Marker. Must be
 public void EnableMarker()
 {
     if (minimapManager == null)
     {
         minimapManager = FindObjectOfType <MinimapManager>();
     }
     if (marker != null)
     {
         if (!marker.isActiveAndEnabled)
         {
             marker.gameObject.SetActive(true);
         }
         if (!_init)
         {
             marker = Instantiate(marker);
             marker.Initialize(targetTransform);
             minimapManager.AddNewMarker(marker, objectType);
             marker.SetFollow(shouldFollow);
             _init = true;
         }
         else
         {
             minimapManager.ResetMarkerSprite(marker);
         }
         if (markerSprite != null && objectType == TYPE.UNIQUE)
         {
             marker.SetSprite(markerSprite);
         }
     }
 }
예제 #2
0
        //Resets Marker sprite to Default TYPE sprite
        public void ResetMarkerSprite(MinimapMarker p_marker)
        {
            switch (p_marker.GetMarkerType())
            {
            case TYPE.PLAYER:
                p_marker.SetSprite(playerSprite);
                break;

            case TYPE.ALLY:
                p_marker.SetSprite(allySprite);
                break;

            case TYPE.ENEMY:
                p_marker.SetSprite(enemySprite);
                break;
            }
            p_marker.SetFollow(true);
        }
예제 #3
0
        //Set Death Sprite for marker
        public void MarkerDied(MinimapMarker p_marker)
        {
            switch (p_marker.GetMarkerType())
            {
            case TYPE.PLAYER:
                p_marker.SetSprite(playerDeathSprite);
                break;

            case TYPE.ALLY:
                p_marker.SetSprite(allyDeathSprite);
                break;

            case TYPE.ENEMY:
                p_marker.SetSprite(enemyDeathSprite);
                break;
            }
            p_marker.SetFollow(false);
        }
예제 #4
0
 public void ShouldFollow(bool p_follow)
 {
     shouldFollow = p_follow;
     marker.SetFollow(p_follow);
 }