scripts.nqp.processors package¶
Submodules¶
scripts.nqp.processors.display module¶
-
process_updates
(time_delta: float, game_state: scripts.engine.internal.constant.GameState)[source]¶ Fire realtime processors.
scripts.nqp.processors.game module¶
-
class
GameEventSubscriber
[source]¶ Bases:
scripts.engine.internal.event.Subscriber
Handle interaction events.
scripts.nqp.processors.input module¶
-
process_input_event
(event: pygame.event, game_state: GameState)[source]¶ Extract the intent from the event and process them in the context of the game state. If an event can only be called in one way then no intent is generated and the event will directly go to the relevant action.
This covers the custom InputEventType and pygame pygame.KEYDOWN events.
scripts.nqp.processors.intent module¶
-
process_intent
(intent: InputIntentType, game_state: Optional[scripts.engine.internal.constant.GameState] = None)[source]¶ Process the intent in the context of the game state. Intents are game state sensitive. If no game state is passed the current one will be obtained.
scripts.nqp.processors.targeting module¶
-
class
Targeting
[source]¶ Bases:
object
-
check_valid_line_of_sight
(pos: Tuple[int, int]) → Tuple[bool, List][source]¶ Checks if a tile is in the line of sight from the player and returns the visible path to the target tile.
-
process_click
()[source]¶ Process a click. This is currently just used during targeting to trigger the cast event since the camera tracks what tiles are targetable. TODO: Move targeting logic out of the camera.
-
process_events
(camera)[source]¶ For processing local events based on camera data. Updates the current hovered tile based on mouse position and updates the TILE_INFO GUI element.
-
render
(camera, target_surf: pygame.Surface)[source]¶
-