Skip to main content

euv_core/game/ecs/
enum.rs

1use super::*;
2
3/// Dynamics classification for a 2D physics body inside `GameWorld`.
4#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
5pub enum BodyKind {
6    /// Immovable static geometry such as arena walls, platforms, and tiles.
7    Static,
8    /// Full rigid body integrated by forces, gravity, drag, and collision impulses.
9    #[default]
10    Dynamic,
11    /// Script-driven body whose velocity moves it without receiving external collision impulses.
12    Kinematic,
13}
14
15/// Collision volume shape attached to a game entity.
16#[derive(Clone, Copy, Debug, PartialEq)]
17pub enum ColliderShape {
18    /// Axis-aligned bounding box defined by full `(width, height)` centered on entity position.
19    Aabb {
20        /// Full width in world units.
21        width: f32,
22        /// Full height in world units.
23        height: f32,
24    },
25    /// Circle collider defined by `radius` centered on entity position.
26    Circle {
27        /// Radius in world units.
28        radius: f32,
29    },
30}
31
32/// Visual primitive rendered for an entity when no sprite-sheet buffer is attached.
33#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
34pub enum EntityVisualShape {
35    /// Axis-aligned or rounded rectangle.
36    #[default]
37    Rect,
38    /// Smooth anti-aliased filled circle.
39    Circle,
40    /// Directional triangle pointing along `rotation_rad`.
41    Triangle,
42    /// Diamond / rotated kite silhouette.
43    Diamond,
44}
45
46/// Semantic gameplay tag used for fast collision filtering and query grouping.
47#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
48pub enum EntityTag {
49    /// Untyped generic game object.
50    #[default]
51    Generic,
52    /// Player-controlled avatar.
53    Player,
54    /// Hostile AI agent or boss.
55    Enemy,
56    /// Player or enemy projectile.
57    Projectile,
58    /// Collectible pickup or power-up.
59    Pickup,
60    /// Arena wall or obstacle.
61    Obstacle,
62    /// Visual decoration or effect anchor.
63    Effect,
64}