Skip to content

Commit

Permalink
Merge branch 'main' into Team-2-sound
Browse files Browse the repository at this point in the history
  • Loading branch information
The-AhmadAA committed Oct 2, 2023
2 parents 2ba7963 + 251742d commit a08a11f
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,14 @@ public void run() {
/**
* Highlights the tile under the mouse cursor by changing its texture region.
*
* <p>When hovering over a tile on the terrain, this method performs the following:
* <ol>
* <li>Unprojects the mouse's screen position to the world position using the camera.</li>
* <li>Calculates the tile's coordinates based on the world position and tile size.</li>
* <li>If there was a previously highlighted tile, it restores its original texture region.</li>
* <li>If the current tile under the mouse is different from the last hovered tile, it updates
* the tile's texture region to a highlight texture.</li>
* <li>Updates the reference to the last hovered tile.</li>
* </ol>
* </p>
* When hovering over a tile on the terrain, this method performs the following:
*
* 1-Unprojects the mouse's screen position to the world position using the camera.
* 2-Calculates the tile's coordinates based on the world position and tile size.
* 3-If there was a previously highlighted tile, it restores its original texture region.
* 4-If the current tile under the mouse is different from the last hovered tile, it updates.
* 5-the tile's texture region to a highlight texture.
* 6-Updates the reference to the last hovered tile.
*
* @see TiledMapTileLayer
* @see TiledMapTileLayer.Cell
Expand Down

0 comments on commit a08a11f

Please sign in to comment.