???
This commit is contained in:
parent
5587a7dc35
commit
022fac5966
8 changed files with 150 additions and 13 deletions
|
|
@ -5,6 +5,7 @@ version.workspace = true
|
|||
authors.workspace = true
|
||||
|
||||
[dependencies]
|
||||
moonhare_ecs = { path = "../moonhare_ecs" }
|
||||
moonhare_graphics = { path = "../moonhare_graphics" }
|
||||
moonhare_log = { path = "../moonhare_log" }
|
||||
moonhare_window = { path = "../moonhare_window" }
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
use std::rc::Rc;
|
||||
|
||||
|
||||
use moonhare_ecs::world::World;
|
||||
use moonhare_graphics::{color::Color, glium::{backend::Context, glutin::api::egl::context}};
|
||||
use moonhare_log::*;
|
||||
use moonhare_window::{platforms::glfw_window::GLFWWindow};
|
||||
|
|
@ -10,19 +12,17 @@ pub mod basic;
|
|||
/// Only one Game may exist per project
|
||||
#[derive(Debug)]
|
||||
pub struct Game {
|
||||
pub world: World,
|
||||
pub is_running: bool,
|
||||
pub name: String,
|
||||
pub context: moonhare_window::WindowRenderContext,
|
||||
pub glfw_window: Option<moonhare_window::platforms::glfw_window::GLFWWindow>,
|
||||
}
|
||||
|
||||
impl Default for Game {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
world: World::new(),
|
||||
is_running: true,
|
||||
name: default_game_name(),
|
||||
context: moonhare_window::WindowRenderContext::OPENGLGLFW,
|
||||
glfw_window: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue