1use bevy_ecs::prelude::*;
2use egor::app::*;
3use egor::math::*;
4use egor::app::*;
5
6pub mod input;
7pub mod prelude;
8mod render;
9
10pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");
11
12pub trait Plugin {
13 fn create(world: &mut World, schedule: &mut Schedule);
14}
15
16#[derive(Default, Component)]
17pub struct Position {
18 pub x: f32,
19 pub y: f32,
20}
21
22impl Position {
23 pub fn as_vec2(&self) -> Vec2 {
24 Vec2::new(self.x, self.y)
25 }
26
27 pub fn from_vec2(&mut self, vec: Vec2) {
28 self.x = vec.x;
29 self.y = vec.y;
30 }
31}