Public Member Functions | |
| __init__ (self, width=1920, height=1080) | |
| handle_event (self, event) | |
| start_game (self) | |
| draw_background (self) | |
| run (self) | |
Protected Member Functions | |
| _handle_mouse_button_down (self, event) | |
| _handle_mouse_button_up (self, event) | |
| _handle_mouse_motion (self, event) | |
| _handle_zoom (self, event) | |
| _create_block (self, event) | |
| _handle_ui_event (self, event) | |
@class SimulationView @brief Manages the overall simulation view, including rendering and user interactions. The SimulationView class handles the game loop, rendering of creepers and Steves, user interactions like zoom and pan, and managing the UI.
| view.view.SimulationView.__init__ | ( | self, | |
width = 1920, |
|||
height = 1080 |
|||
| ) |
Initializes a SimulationView object. @param width: The width of the simulation window. @param height: The height of the simulation window.
|
protected |
|
protected |
Handles user input events such as mouse and UI interactions. @param event: The pygame event to handle. @return: False if the event signals to quit, otherwise True.
|
protected |
Handles mouse button up events. @param event: The pygame event for mouse button up. @return: True if the event is processed.
|
protected |
|
protected |
|
protected |
| view.view.SimulationView.draw_background | ( | self | ) |
Draws the background of the simulation view.
| view.view.SimulationView.handle_event | ( | self, | |
| event | |||
| ) |
| view.view.SimulationView.run | ( | self | ) |
Runs the main game loop.
| view.view.SimulationView.start_game | ( | self | ) |
Starts the game and initializes the simulation.
| view.view.SimulationView.background_image |
| view.view.SimulationView.blocks |
| view.view.SimulationView.center_x |
| view.view.SimulationView.center_y |
| view.view.SimulationView.clock |
| view.view.SimulationView.creepers_params |
| view.view.SimulationView.dist_func |
| view.view.SimulationView.dragging |
| view.view.SimulationView.explodes_drawer |
| view.view.SimulationView.func_type_map |
| view.view.SimulationView.height |
| view.view.SimulationView.image_provider |
| view.view.SimulationView.last_mouse_pos |
| view.view.SimulationView.last_update_time |
| view.view.SimulationView.manager |
| view.view.SimulationView.offset_x |
| view.view.SimulationView.offset_y |
| view.view.SimulationView.parameters |
| view.view.SimulationView.params |
| view.view.SimulationView.radius |
| view.view.SimulationView.running_game |
| view.view.SimulationView.screen |
| view.view.SimulationView.simulation |
| view.view.SimulationView.sparkle_drawer |
| view.view.SimulationView.steve_params |
| view.view.SimulationView.thao |
| view.view.SimulationView.ui |
| view.view.SimulationView.waiting_blocks |
| view.view.SimulationView.width |
| view.view.SimulationView.will_explodes |
| view.view.SimulationView.will_sparkle |
| view.view.SimulationView.zoom_level |