private void UpdateExitSymbol()
{
if (Vector3
.Distance(Blaze
.transform.position,
new Vector3
(512,
0,
-512)) > 20f
) {
Vector3 screenPos
= Camera
.main.WorldToScreenPoint(new Vector3
(512,
8,
-512)); float fBounds = 17.5f;
// Move the sprite in screen space
screenPos.x = Mathf.Clamp(screenPos.x, fBounds, Screen.width - fBounds);
screenPos.y = Mathf.Clamp(screenPos.y, fBounds, Screen.height - fBounds);
Vector2 worldPos = Level.Instance.GetUICamera().ScreenToWorldPoint(screenPos);
FireExitSymbol.transform.position = worldPos;
NGUITools.SetActive(FireExitSymbol.gameObject, true);
}
else
{
NGUITools.SetActive(FireExitSymbol.gameObject, false);
}
}