renaming methods to match the names of the methods called within

This commit is contained in:
Thomas Kosel 2021-07-29 22:55:58 +02:00
parent 0b07b14093
commit 005c33bb28
No known key found for this signature in database
GPG Key ID: AC43C6126CC42595
2 changed files with 4 additions and 4 deletions

View File

@ -222,7 +222,7 @@ impl CharacterState {
std::mem::discriminant(self) == std::mem::discriminant(other)
}
pub fn execute_behavior(&self, j: &JoinData) -> StateUpdate {
pub fn behavior(&self, j: &JoinData) -> StateUpdate {
match &self {
CharacterState::Idle => states::idle::Data.behavior(&j),
CharacterState::Talk => states::talk::Data.behavior(&j),
@ -258,7 +258,7 @@ impl CharacterState {
}
}
pub fn handle_action(&self, j: &JoinData, action: ControlAction) -> StateUpdate {
pub fn handle_event(&self, j: &JoinData, action: ControlAction) -> StateUpdate {
match &self {
CharacterState::Idle => states::idle::Data.handle_event(&j, action),
CharacterState::Talk => states::talk::Data.handle_event(&j, action),

View File

@ -269,7 +269,7 @@ impl<'a> System<'a> for Sys {
&read_data.dt,
&read_data.msm,
);
let state_update = j.character.handle_action(&j, action);
let state_update = j.character.handle_event(&j, action);
<Sys>::publish_state_update(
&mut join_struct,
state_update,
@ -295,7 +295,7 @@ impl<'a> System<'a> for Sys {
&read_data.msm,
);
let state_update = j.character.execute_behavior(&j);
let state_update = j.character.behavior(&j);
<Sys>::publish_state_update(
&mut join_struct,
state_update,