dialog WIP paths consolidation and rendering
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use glam::Vec3;
|
||||
|
||||
use crate::components::trigger::{TriggerEvent, TriggerEventKind, TriggerFilter, TriggerShape, TriggerState};
|
||||
use crate::components::trigger::{
|
||||
TriggerEvent, TriggerEventKind, TriggerFilter, TriggerShape, TriggerState,
|
||||
};
|
||||
use crate::entity::EntityHandle;
|
||||
use crate::world::World;
|
||||
|
||||
@@ -35,10 +37,12 @@ pub fn trigger_system(world: &mut World)
|
||||
|
||||
let overlapping = match world.triggers.get(trigger_entity)
|
||||
{
|
||||
Some(trigger) => activator_positions.iter().any(|(_, pos)| match &trigger.shape
|
||||
{
|
||||
TriggerShape::Sphere { radius } => (trigger_pos - *pos).length() < *radius,
|
||||
}),
|
||||
Some(trigger) => activator_positions
|
||||
.iter()
|
||||
.any(|(_, pos)| match &trigger.shape
|
||||
{
|
||||
TriggerShape::Sphere { radius } => (trigger_pos - *pos).length() < *radius,
|
||||
}),
|
||||
None => continue,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user