Draw a path from the hero to the current mouse point
Add a highlight grid to Map, with locations set to True if that point should be drawn with a "highlight" treatment. Add the highlight graphic_dtype to all Tiles.
This commit is contained in:
parent
f05dfdef55
commit
6c9d01771f
4 changed files with 80 additions and 29 deletions
|
@ -28,7 +28,7 @@ class EventHandler(tcod.event.EventDispatch[Action]):
|
|||
context.convert_event(event)
|
||||
self.handle_event(event)
|
||||
|
||||
def handle_event(self, event: tcod.event.Event) -> None:
|
||||
def handle_event(self, event: tcod.event.Event):
|
||||
'''
|
||||
Handle an event by transforming it into an Action and processing it until it is completed. If the Action
|
||||
succeeds, also process actions from other Entities.
|
||||
|
@ -95,7 +95,7 @@ class MainGameEventHandler(EventHandler):
|
|||
mouse_point = Point(event.tile.x, event.tile.y)
|
||||
if not self.engine.map.tile_is_in_bounds(mouse_point):
|
||||
mouse_point = None
|
||||
self.engine.current_mouse_point = mouse_point
|
||||
self.engine.update_mouse_point(mouse_point)
|
||||
|
||||
|
||||
class GameOverEventHandler(EventHandler):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue