Exemplo n.º 1
0
 /// <summary>
 /// When the player clicks on the background, their character
 /// should move toward the point they clicked.
 /// </summary>
 void OnMouseUpAsButton()
 {
     if (UIManager.WorldInputEnabled)
     {
         GameItem.CancelInteraction();
         Vector2 pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
         GameManager.Player.MoveToPoint(pos);
     }
 }