tangled
alpha
login
or
join now
morri.squi.dev
/
baecase
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
fix the ghost being kinda silly sometimes
morri.squi.dev
4 months ago
3aa10a61
b6b76d65
+6
-1
1 changed file
expand all
collapse all
unified
split
src
main.rs
+6
-1
src/main.rs
···
45
45
}
46
46
47
47
#[derive(Component)]
48
48
+
#[relationship(relationship_target = TargetedBerry)]
48
49
pub struct TargetBerry(pub Entity);
49
50
51
51
+
#[derive(Component)]
52
52
+
#[relationship_target(relationship = TargetBerry)]
53
53
+
pub struct TargetedBerry(Entity);
54
54
+
50
55
fn find_closest_berry(
51
56
In(input): In<OperatorInput>,
52
57
mut commands: Commands,
53
53
-
berries: Query<(Entity, &Transform), With<Berry>>,
58
58
+
berries: Query<(Entity, &Transform), (With<Berry>, Without<TargetedBerry>, Without<Plan>)>,
54
59
planner: Query<&Transform, With<Plan>>,
55
60
) -> OperatorStatus {
56
61
let pos = planner.get(input.entity).unwrap().translation.xy();