traaains/utils/linked_list.rs
1use bevy::ecs::{component::Component, entity::Entity};
2
3#[derive(Default, Component)]
4pub struct LinkedList {
5 pub head: Option<Entity>,
6 pub tail: Option<Entity>,
7}
8
9// in the case of track signals, in the positive direction of travel - independent of the way the signal is facing
10#[derive(Default, Component)]
11pub struct LinkedListItem {
12 pub prev: Option<Entity>,
13 pub next: Option<Entity>,
14}