2021-01-27 18:20:47 +00:00
|
|
|
use crate::framework::context::Context;
|
|
|
|
use crate::framework::error::GameResult;
|
2020-08-18 16:46:07 +00:00
|
|
|
|
2020-08-19 13:11:34 +00:00
|
|
|
use crate::frame::Frame;
|
2020-09-20 15:27:31 +00:00
|
|
|
use crate::shared_game_state::SharedGameState;
|
2020-08-18 16:46:07 +00:00
|
|
|
|
2020-09-05 02:09:52 +00:00
|
|
|
pub trait GameEntity<C> {
|
|
|
|
fn tick(&mut self, state: &mut SharedGameState, custom: C) -> GameResult;
|
2020-08-18 16:46:07 +00:00
|
|
|
|
2020-08-19 13:11:34 +00:00
|
|
|
fn draw(&self, state: &mut SharedGameState, ctx: &mut Context, frame: &Frame) -> GameResult;
|
2020-08-18 16:46:07 +00:00
|
|
|
}
|