Example #1
0
    def _event_input(self, value: Tuple[int,
                                        int], scene: Scene, entity_id: UUID,
                     value_name: str, component: ComponentPosition) -> bool:
        if value_name == "coordinate_x_y":
            system_word: Optional[SystemWord] = scene.get_system(SystemWord)

            if system_word is None:
                return False

            move: bool = system_word.set_move(entity_id=entity_id,
                                              component=component,
                                              move_x=value[0],
                                              move_y=value[1])
            scene.set_status(GameStatus.runner)
            return move
Example #2
0
 def event(self, scene: Scene, system_event: System, event_type: str,
           entity_id: UUID, component: Component, value: Any,
           value_name: str, kwargs: Dict[str, Any]) -> None:
     component: ComponentInventory
     scene.set_resource("dialog", component.entity_items)
     scene.set_status(GameStatus.dialog)