KYEVTQT5IWDHVCMV2TORNQPODLJBKD3HLS4EIXR5HOL5DZI3UVKQC
J32UZAU7V6XDZUSDHMLVA474JC4S4AHMLZZN55XC74YMXW4ZMFKQC
WQS2WD437EWG2CKPOY5TDWPEBE3US7LGHVAH2HVYQ7RW2L6FHJ5AC
EV477LPQ57FEHMFO6E3LL5MFWZC6NTGER42SKP5CJN73SWXGB5AQC
VICUJP7SGKKCO2ZWO5ACSO3OS4HV4JTXTHQHYSFOADANGUJ5ZDDAC
DBHCCY3W2DG4WYMXBZ2UCNYVGZ5PS5UUUNWCXVYJ4TMXQDIZT6GAC
7FTW5AQKOO4W5AIHYZSAKLQR6LGVTXH7SKMSTA4ER4C4HP54VE4QC
KZU3YXA22IYIPZICQTMZ4XILKCWOI5O6W4H72PDXDUTZDFVMVGVQC
OQCI44VL3IROGBJ52MUI3AICPKEPAJVFL45PGQNNQRK4TKIK7HAAC
MKB2A5XCWBZO2E6QFE6PD36LF3IGMJCGJB5TGMRAPSKCKHS75ISAC
R5KHFY6NVDHJJC5WNM4H5MXTVXRRZ2SLGL3LOWHGCEEF66KVBE7AC
EQ6ZV6AZEAW6XVZFIZCMKFFE6EAL2I2XTLDTN7BUC53T5H7FS5FQC
cb.spawn(movement_pointer::MovementPointerBundle {
pointer: movement_pointer::MovementPointer,
shape: ShapeBundle {
spatial: SpatialBundle {
transform: Transform::default().with_scale(Vec3::new(0.5, 1.0, 1.0)),
..default()
},
path: GeometryBuilder::build_as(&shapes::RegularPolygon {
sides: 3,
feature: shapes::RegularPolygonFeature::Apothem(5.0),
..default()
}),
material: materials.add(Color::ORANGE_RED),
..default()
},
});
cb.spawn(movement_pointer::MovementPointerBundle::new(
materials.add(Color::ORANGE_RED),
));
use bevy_prototype_lyon::entity::ShapeBundle;
use bevy_prototype_lyon::{entity::ShapeBundle, geometry::GeometryBuilder, shapes};
pub struct MovementPointerPlugin;
impl Plugin for MovementPointerPlugin {
fn build(&self, app: &mut App) {
app.add_systems(Update, update_movement_pointer);
}
}
pub pointer: MovementPointer,
pub shape: ShapeBundle,
pointer: MovementPointer,
shape: ShapeBundle,
}
impl MovementPointerBundle {
pub fn new(material: Handle<ColorMaterial>) -> Self {
Self {
pointer: MovementPointer,
shape: ShapeBundle {
spatial: SpatialBundle {
transform: Transform::default().with_scale(Vec3::new(0.5, 1.0, 1.0)),
..default()
},
path: GeometryBuilder::build_as(&shapes::RegularPolygon {
sides: 3,
feature: shapes::RegularPolygonFeature::Apothem(5.0),
..default()
}),
material,
..default()
},
}
}
cb.spawn(movement_pointer::MovementPointerBundle {
pointer: movement_pointer::MovementPointer,
shape: ShapeBundle {
spatial: SpatialBundle {
transform: Transform::default().with_scale(Vec3::new(0.5, 1.0, 1.0)),
..default()
},
path: GeometryBuilder::build_as(&shapes::RegularPolygon {
sides: 3,
feature: shapes::RegularPolygonFeature::Apothem(5.0),
..default()
}),
material: materials.add(Color::ORANGE_RED),
..default()
},
});
cb.spawn(movement_pointer::MovementPointerBundle::new(
materials.add(Color::ORANGE_RED),
));