File tree Expand file tree Collapse file tree
Assets/Project/Scripts/Game Objects/Managers/Map Tile Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44public class HoveredMapTileManager : MonoBehaviour , IPrimaryWindowElement , IMapEditingElement
55{
66 public UnityEvent < MapTile > hoveredMapTileWasChangedEvent ;
7-
7+
8+ private bool mapTileCanBeDetectedAfterPathfinding = true ;
89 private bool mapTilesCanBeHovered = true ;
910 private MapTile mapTile ;
1011#if ! UNITY_ANDROID
@@ -19,6 +20,8 @@ public void SetPrimaryWindowElementActive(bool active)
1920 {
2021 SetMapTile ( null ) ;
2122 }
23+
24+ mapTileCanBeDetectedAfterPathfinding = active ;
2225 }
2326
2427 public void SetMapEditingElementActive ( bool active )
@@ -77,7 +80,7 @@ private void RegisterToListeners(bool register)
7780#if ! UNITY_ANDROID
7881 private void OnPathfindingProcessStateWasChanged ( bool started )
7982 {
80- if ( ! started && mapTileRaycaster != null && mapTileRaycaster . ComponentWasDetected ( MouseMethods . GetMousePosition ( ) , out var mapTile ) )
83+ if ( ! started && mapTileCanBeDetectedAfterPathfinding && mapTileRaycaster != null && mapTileRaycaster . ComponentWasDetected ( MouseMethods . GetMousePosition ( ) , out var mapTile ) )
8184 {
8285 SetMapTile ( mapTile ) ;
8386 }
You can’t perform that action at this time.
0 commit comments