1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-20 04:32:50 +00:00
doukutsu-rs/src/entity.rs

12 lines
359 B
Rust
Raw Normal View History

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;
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
}