Renderer functional
This commit is contained in:
+4
-2
@@ -1,7 +1,11 @@
|
||||
pub mod entity;
|
||||
pub mod renderer;
|
||||
pub mod terminal;
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::renderer::Renderer;
|
||||
|
||||
pub fn init() -> Engine {
|
||||
Engine {
|
||||
threads: HashMap::new(),
|
||||
@@ -14,8 +18,6 @@ pub struct Engine {
|
||||
entities: Vec<entity::Entity>,
|
||||
}
|
||||
|
||||
pub struct Renderer {}
|
||||
|
||||
impl Engine {
|
||||
pub fn thread<F: FnMut() + Send + Sync + 'static>(&mut self, label: &str, f: F) {
|
||||
self.threads.insert(label.to_string(), Box::new(f));
|
||||
|
||||
Reference in New Issue
Block a user