Main game engine class for LunaEngine.
This class manages the entire game lifecycle including initialization,
scene management, event handling, rendering, and shutdown.
Attributes:
title (str): Window title
width (int): Window width
height (int): Window height
fullscreen (bool): Whether to start in fullscreen mode
running (bool): Whether the engine is running
clock (pygame.time.Clock): Game clock for FPS control
scenes (Dict[str, Scene]): Registered scenes
current_scene (Scene): Currently active scene
def __init__(self: Any, title: str = 'LunaEngine Game', width: int = 800, height: int = 600, fullscreen: bool = False, icon: str | pygame.Surface = None, **kwargs: dict) -> Any
def initialize(self: Any) -> Any
def set_title(self: Any, title: str) -> Any
def set_icon(self: Any, icon: str | pygame.Surface) -> Any
def update_camera_renderer(self: Any) -> Any
def add_scene(self: Any, name: str, scene_class: Type[Scene], *args: tuple, **kwargs: dict) -> Any
def set_scene(self: Any, name: str) -> Any
def find_event_handlers(self: Any, event: int, rep_id: str) -> bool
def on_event(self: Any, event_type: int, rep_id: Optional[str] = None) -> Any
def setup_notifications(self: Any, max_concurrent: int = 5, margin: int = 20, spacing: int = 10) -> Any
def show_notification(self: Any, text: str, notification_type: NotificationType = NotificationType.INFO, duration: Optional[float] = None, position: Any = NotificationPosition.TOP_RIGHT, width: int = 300, height: int = 60, show_close_button: bool = True, auto_close: bool = True, animation_speed: float = 0.3, show_progress_bar: bool = False, on_close: Optional[Callable] = None, on_click: Optional[Callable] = None) -> Any
def show_info(self: Any, text: str, duration: Optional[float] = None, position: Any = NotificationPosition.TOP_RIGHT) -> 'Notification'
def show_success(self: Any, text: str, duration: Optional[float] = None, position: Any = NotificationPosition.TOP_RIGHT) -> 'Notification'
def show_warning(self: Any, text: str, duration: Optional[float] = None, position: Any = NotificationPosition.TOP_RIGHT) -> 'Notification'
def show_error(self: Any, text: str, duration: Optional[float] = None, position: Any = NotificationPosition.TOP_RIGHT) -> 'Notification'
def clear_all_notifications(self: Any) -> Any
def get_notification_count(self: Any) -> int
def get_notification_queue_length(self: Any) -> int
def has_notifications(self: Any) -> bool
def has_queued_notifications(self: Any) -> bool
def get_all_themes(self: Any) -> Dict[str, any]
def get_theme_names(self: Any) -> List[str]
def set_global_theme(self: Any, theme: str) -> bool
def _update_all_ui_themes(self: Any, theme_enum: Any) -> Any
def get_fps_stats(self: Any) -> dict
def get_hardware_info(self: Any) -> dict
def ScaleSize(self: Any, width: float, height: float) -> Tuple[float, float] | Tuple[int, int]
def ScalePos(self: Any, x: float, y: float) -> Tuple[float, float] | Tuple[int, int]
def setRatio(self: Any, base_width: int, base_height: int) -> pygame.Vector2
def run(self: Any) -> Any
def on_window_resize(self: Any, func: Callable) -> Any
def on_window_close(self: Any, func: Callable) -> Any
def on_window_focus(self: Any, func: Callable) -> Any
def on_window_blur(self: Any, func: Callable) -> Any
def on_window_move(self: Any, func: Callable) -> Any
def on_window_minimize(self: Any, func: Callable) -> Any
def on_window_maximize(self: Any, func: Callable) -> Any
def on_window_restore(self: Any, func: Callable) -> Any
def on_window_enter(self: Any, func: Callable) -> Any
def on_window_leave(self: Any, func: Callable) -> Any
def get_window_state(self: Any) -> Dict[str, Any]
def is_window_focused(self: Any) -> bool
def is_window_minimized(self: Any) -> bool
def is_window_maximized(self: Any) -> bool
def get_controllers(self: Any) -> List['Controller']
def get_controller(self: Any, index: int) -> Optional['Controller']
def is_using_controller(self: Any) -> bool
def on_controller_connect(self: Any, callback: Callable[['Controller'], None]) -> Any
def on_controller_disconnect(self: Any, callback: Callable[['Controller'], None]) -> Any
def update_mouse(self: Any) -> Any
def visibility_change(self: Any, element: UIElement, visible: bool) -> Any
def mouse_pos(self: Any) -> tuple
def mouse_pressed(self: Any) -> list
def mouse_wheel(self: Any) -> float
def _render(self: Any) -> Any
def _render_ui_elements(self: Any) -> Any
def _render_particles(self: Any) -> Any
def _update_ui_elements(self: Any, dt: Any) -> Any
def _process_ui_element_tree(self: Any, root_element: Any, dt: Any) -> Any
def enable_performance_profiling(self: Any, enabled: bool = True) -> Any
def get_frame_timing_breakdown(self: Any) -> Dict[str, float]
def get_performance_stats(self: Any) -> Dict[str, Any]
def get_update_timing_stats(self: Any, category: str = 'all') -> Dict[str, Any]
def get_render_timing_stats(self: Any, category: str = 'all') -> Dict[str, Any]
def get_ui_update_stats(self: Any) -> Dict[str, Any]
def get_ui_render_stats(self: Any) -> Dict[str, Any]
def get_individual_ui_update_stats(self: Any) -> Dict[str, float]
def get_individual_ui_render_stats(self: Any) -> Dict[str, float]
def get_scene_update_stats(self: Any) -> Dict[str, Any]
def get_scene_render_stats(self: Any) -> Dict[str, Any]
def get_total_frame_time(self: Any) -> Dict[str, float]
def shutdown(self: Any) -> Any