doukutsu-rs/src/entity.rs

11 lines
311 B
Rust
Raw Normal View History

use ggez::{Context, 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
}