mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
renaming methods to match the names of the methods called within
This commit is contained in:
parent
0b07b14093
commit
005c33bb28
@ -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),
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user