Skip to main content

switch_shape

Function switch_shape 

Source
pub fn switch_shape(
    input: Res<'_, ButtonInput<KeyCode>>,
    current_shape: Res<'_, State<CurrentShape>>,
    next_shape: ResMut<'_, NextState<CurrentShape>>,
    current_step: Res<'_, State<CurrentStep>>,
    next_step: ResMut<'_, NextState<CurrentStep>>,
)
Expand description

System that listens for switching shapes keybinds and changes state/resources accordingly. Any shape/mesh/material changes are handled in the state transition listeners.