MCPcopy Create free account

hub / github.com/Seldom-SE/seldom_state / functions

Functions94 in github.com/Seldom-SE/seldom_state

↓ 19 callersMethodinto_trigger
(self)
src/trigger.rs:200
↓ 8 callersMethodinto_result
(self)
src/trigger.rs:78
↓ 6 callersMethodpush
(&mut self, res: Result<T, E>)
src/lib.rs:79
↓ 5 callersFunctionaxis_pair
Trigger that transitions if the given [`Actionlike`]'s [`DualAxisData`] is within the given bounds. If no minimum length is necessary, use `0.`. To e
src/trigger/input.rs:104
↓ 5 callersFunctionclamped_axis_pair
[`axis_pair`] with axes clamped to [-1, 1]
src/trigger/input.rs:185
↓ 5 callersMethodrun
Runs all transitions until one is actually taken. If one is taken, logs the transition and runs `on_enter/on_exit` triggers. TODO Defer the actual tra
src/machine.rs:364
↓ 5 callersMethodset_trans_logging
Sets whether transitions are logged to the console
src/machine.rs:342
↓ 3 callersFunctionclamped_value
[`value`] clamped to [-1, 1]
src/trigger/input.rs:50
↓ 3 callersMethodtrans_builder
Adds a transition builder to the state machine. When the entity is in `Prev` state, and `Trig` occurs, the given builder will be run on `Trig::Ok`. If
src/machine.rs:216
↓ 3 callersFunctionvalue
Trigger that transitions if the given [`Actionlike`]'s value is within the given bounds. Consider using `f32::NEG_INFINITY`/`f32::INFINITY` in the bou
src/trigger/input.rs:10
↓ 2 callersMethodclone
(&self)
src/state.rs:94
↓ 2 callersFunctionplug
(schedule: Interned<dyn ScheduleLabel>)
src/machine.rs:20
↓ 2 callersMethodtrigger
(&self, entity: Entity, commands: &mut Commands)
src/state.rs:128
↓ 1 callersMethodand
Combines these triggers by logical AND. Do not override.
src/trigger.rs:138
↓ 1 callersMethodcheck
( &'a mut self, world: &World, entity: Entity, )
src/machine.rs:82
↓ 1 callersFunctiondone
Trigger that transitions if the entity has the [`Done`] component. Provide `Some(Done::Variant)` to transition upon that particular variant, or `None`
src/trigger.rs:389
↓ 1 callersMethodinit
(&mut self, world: &mut World)
src/machine.rs:77
↓ 1 callersMethodinit_transitions
Initialize all transitions. Must be executed before `run`. This is separate because `run` is parallelizable (takes a `&World`) but this isn't (takes a
src/machine.rs:349
↓ 1 callersFunctionjust_pressed
Trigger that transitions upon pressing the given [`Actionlike`]
src/trigger/input.rs:266
↓ 1 callersMethodnot
Negates the trigger. Do not override.
src/trigger.rs:126
↓ 1 callersFunctionvalue_unbounded
Unbounded [`value`]
src/trigger/input.rs:35
Functionaction_data
Provides the given [`Actionlike`]'s [`ActionData`]
src/trigger/input.rs:314
Functionalways
Trigger that always transitions
src/trigger.rs:260
Methodapply
(self, world: &mut World)
src/machine.rs:571
Functionaxis_pair_length_bounds
[`axis_pair`] with only length bounds
src/trigger/input.rs:169
Functionaxis_pair_max_length
[`axis_pair`] with only a maximum length bound
src/trigger/input.rs:161
Functionaxis_pair_min_length
[`axis_pair`] with only a minimum length bound
src/trigger/input.rs:153
Functionaxis_pair_rotation_bounds
[`axis_pair`] with only rotation bounds
src/trigger/input.rs:177
Functionaxis_pair_unbounded
Unbounded [`axis_pair`]
src/trigger/input.rs:146
Methodbuild
(&self, app: &mut App)
src/lib.rs:39
Methodcheck
(&mut self, entity: Entity, world: &World)
src/trigger.rs:232
Functionclamped_axis_pair_length_bounds
[`clamped_axis_pair`] with only length bounds
src/trigger/input.rs:250
Functionclamped_axis_pair_max_length
[`clamped_axis_pair`] with only a maximum length bound
src/trigger/input.rs:242
Functionclamped_axis_pair_min_length
[`clamped_axis_pair`] with only a minimum length bound
src/trigger/input.rs:234
Functionclamped_axis_pair_rotation_bounds
[`clamped_axis_pair`] with only rotation bounds
src/trigger/input.rs:258
Functionclamped_axis_pair_unbounded
Unbounded [`clamped_axis_pair`]
src/trigger/input.rs:227
Functionclamped_value_max
[`clamped_value`] with only a maximum bound
src/trigger/input.rs:90
Functionclamped_value_min
[`clamped_value`] with only a minimum bound
src/trigger/input.rs:82
Functionclamped_value_unbounded
Unbounded [`clamped_value`]
src/trigger/input.rs:75
Functionclick
( mouse: Res<ButtonInput<MouseButton>>, cursor_position: Res<CursorPosition>, )
examples/done.rs:36
Methodcommand_on_enter
Adds an on-enter command to the state machine. Whenever the state machine transitions from any previous state to the given next state, it will run the
src/machine.rs:314
Methodcommand_on_enter_to
Adds an on-enter command to the state machine. Whenever the state machine transitions from the given previous state to the given next state, it will r
src/machine.rs:298
Methodcommand_on_exit
Adds an on-exit command to the state machine. Whenever the state machine transitions from the given previous state to any next state, it will run the
src/machine.rs:337
Methodcommand_on_exit_from
Adds an on-exit command to the state machine. Whenever the state machine transitions from the given previous state to the given next state, it will ru
src/machine.rs:321
Methoddefault
()
src/machine.rs:175
Methoddefault
()
src/lib.rs:23
Functionfall
(mut fallings: Query<(&mut Transform, &mut Falling)>, time: Res<Time>)
examples/input.rs:103
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/machine.rs:61
Methodfmt
(&self, f: &mut Formatter<'_>)
src/state.rs:141
Functionfollow
Let's define some behavior for entities in the follow state
examples/chase.rs:94
Methodfrom
(value: ErrList)
src/lib.rs:91
Methodfrom_entity
(_: Entity)
src/trigger.rs:53
Functiongo_to_target
( mut commands: Commands, mut go_to_selections: Query<(Entity, &mut Transform, &GoToSelection)>, t
examples/done.rs:57
Functiongrounded
(In(entity): In<Entity>, fallings: Query<(&Transform, &Falling)>)
examples/input.rs:74
Methodignore_and
Combines these triggers by logical AND, discarding the output of the first. Do not override.
src/trigger.rs:157
Functioninit
(mut commands: Commands, asset_server: Res<AssetServer>)
examples/done.rs:16
Functioninit
(mut commands: Commands, asset_server: Res<AssetServer>)
examples/input.rs:22
Functioninit
Setup the game
examples/chase.rs:17
Methodinit
(&mut self, world: &mut World)
src/trigger.rs:228
Functionjust_released
Trigger that transitions upon releasing the given [`Actionlike`]
src/trigger/input.rs:298
Functionmain
()
examples/done.rs:7
Functionmain
()
examples/input.rs:8
Functionmain
()
examples/chase.rs:7
Methodmatches
(state: TypeId)
src/state.rs:25
Methodmetadata_mut
Get the metadata for the given state, creating it if necessary.
src/machine.rs:207
Functionmove_player
( mut players: Query<&mut Transform, With<Player>>, keys: Res<ButtonInput<KeyCode>>, time: Res<Tim
examples/chase.rs:144
Functionnear
(target: Entity)
examples/chase.rs:119
Methodnew
(trigger: Trig, builder: Build)
src/machine.rs:116
Methodon_enter
Adds an on-enter event to the state machine. Whenever the state machine transitions from any previous state to the given next state, it will run the e
src/machine.rs:262
Methodon_enter_to
Adds an on-enter event to the state machine. Whenever the state machine transitions from the given previous state to the given next state, it will run
src/machine.rs:246
Methodon_exit
Adds an on-exit event to the state machine. Whenever the state machine transitions from the given previous state to any next state, it will run the ev
src/machine.rs:288
Methodon_exit_from
Adds an on-enter event to the state machine. Whenever the state machine transitions from the given previous state to the given next state, it will run
src/machine.rs:272
Functionon_message
Trigger that transitions when it receives the associated event
src/trigger.rs:400
Methodor
Combines these triggers by logical OR. Do not override.
src/trigger.rs:173
Functionplug
(schedule: Interned<dyn ScheduleLabel>)
src/trigger.rs:26
Functionpressed
Trigger that transitions while pressing the given [`Actionlike`]
src/trigger/input.rs:282
Methodremove
(entity: Entity, world: &mut World, _: TypeId)
src/state.rs:29
Functionremove_done_markers
(mut commands: Commands, dones: Query<Entity, With<Done>>)
src/trigger.rs:413
Functionresource_present
Triggers when `SomeResource` is present
src/machine.rs:486
Methodschedule
Sets the schedule in which `StateMachine`s are updated. Defaults to `PostUpdate`.
src/lib.rs:32
Functiontest_command_event_matches
()
src/machine.rs:662
Functiontest_event_matches
()
src/machine.rs:618
Functiontest_machine
()
src/machine.rs:505
Functiontest_self_transition
()
src/machine.rs:537
Functiontest_sets_initial_state
()
src/machine.rs:491
Functiontest_state_machine
()
src/machine.rs:558
Functiontest_triggers
()
src/state.rs:185
Methodtrans
Adds a transition to the state machine. When the entity is in the state given as a type parameter, and the given trigger occurs, it will transition to
src/machine.rs:198
Functiontransition
Runs all transitions on all entities. There are comments here about parallelization, but this is not parallelized anymore. Leaving them here in case i
src/machine.rs:417
Functionupdate_cursor_position
( cameras: Query<(&Camera, &GlobalTransform)>, windows: Query<&Window>, mut position: ResMut<Curso
examples/done.rs:88
Functionvalue_max
[`value`] with only a maximum bound
src/trigger/input.rs:45
Functionvalue_min
[`value`] with only a minimum bound
src/trigger/input.rs:40
Functionwalk
(mut groundeds: Query<(&mut Transform, &Grounded)>, time: Res<Time>)
examples/input.rs:95
Methodwith_state
Registers a state. This is only necessary for states that are not used in any transitions.
src/machine.rs:189