feat: entity type for proper edge permission calculations

This commit is contained in:
2025-08-15 10:06:09 -05:00
parent b9bae99a4c
commit 730daed20a
4 changed files with 37 additions and 12 deletions

View File

@@ -11,6 +11,16 @@ use crate::{
#[derive(Default, Component)]
pub struct PlayerControlled;
/// A tag component denoting the type of entity.
#[derive(Component, Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum EntityType {
Player,
Ghost,
Pellet,
PowerPellet,
Wall,
}
/// A component for entities that have a sprite, with a layer for ordering.
///
/// This is intended to be modified by other entities allowing animation.
@@ -127,6 +137,7 @@ pub struct PlayerBundle {
pub velocity: Velocity,
pub sprite: Renderable,
pub directional_animated: DirectionalAnimated,
pub entity_type: EntityType,
}
#[derive(Resource)]