diff --git a/src/lib.rs b/src/lib.rs index 4b7a90b..9f19514 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,9 @@ pub mod board; pub mod colors; pub mod snake; + +use bevy::prelude::*; + +pub fn tick() { + info!("tick!"); +} diff --git a/src/main.rs b/src/main.rs index 8571466..9d3caac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ use bevy::prelude::*; use snake::{ board::{spawn_board, Board}, snake::{spawn_snake, Snake}, + tick, }; fn main() { @@ -18,10 +19,12 @@ fn main() { })) .insert_resource(Board::new(20)) .init_resource::() + .insert_resource(Time::::from_seconds(0.1)) .add_systems( Startup, (setup, spawn_board, spawn_snake), ) + .add_systems(FixedUpdate, tick) .run(); }