예제 #1
0
 private void UpdateMouseOverPlanetState()
 {
     isMouseOnAnyPlanet = false;
     foreach (GameObject planet in MapGeneration.GetRefrence().visiblePlanets)
     {
         if (Vector2.Distance(planet.transform.position, Camera.main.ScreenToWorldPoint(Input.mousePosition)) < PlanetTypes.GetPlanetRadius())
         {
             lastHoveredPlanet  = planet;
             isMouseOnAnyPlanet = true;
         }
     }
 }