teki_ecs/app/components.rs
1use legion::*;
2use teki_common::{EnemyType, FormationIndex};
3use vector2d::Vector2D;
4
5#[derive(Clone, Copy)]
6pub struct Position(pub Vector2D<i32>);
7
8pub struct SpriteDrawable {
9 pub sprite_name: &'static str,
10 pub offset: Vector2D<i32>,
11}
12
13pub struct MyShot {
14 pub player_entity: Entity,
15}
16
17pub struct Enemy {
18 pub enemy_type: EnemyType,
19 pub formation_index: FormationIndex,
20}
21
22pub struct HitBox {
23 pub size: Vector2D<i32>,
24}