some cleanup of the code

This commit is contained in:
2022-04-12 11:33:22 -04:00
parent ecd6fe45b2
commit 219b277e5c
8 changed files with 57 additions and 57 deletions

View File

@@ -33,9 +33,9 @@ void State::_state_exit(const String state, const Array args)
WARN_PRINT("State " + state + " is missing its _state_exit method!");
}
void State::set_parent(Node *new_parent)
void State::set_parent(Node *parent)
{
parent = new_parent;
this->parent = parent;
}
Node *State::get_parent()
@@ -43,12 +43,12 @@ Node *State::get_parent()
return parent;
}
void State::set_state_machine(StateMachine *new_state_machine)
void State::set_state_machine(StateMachine *state_machine)
{
state_machine = new_state_machine;
this->state_machine = state_machine;
}
StateMachine *State::get_state_machine()
{
return state_machine;
return this->state_machine;
}

View File

@@ -33,11 +33,11 @@ namespace godot
virtual void _state_exit(const String state, const Array args = Array());
virtual void set_parent(Node *new_parent) final;
virtual void set_parent(Node *parent) final;
virtual Node *get_parent() final;
virtual void set_state_machine(StateMachine *new_state_machine) final;
virtual void set_state_machine(StateMachine *state_machine) final;
virtual StateMachine *get_state_machine() final;
};

View File

@@ -155,24 +155,24 @@ Variant StateMachine::_call(const String method, const Array &args)
return this->call(method, args);
}
void StateMachine::set_default_state(const String new_default_state)
void StateMachine::set_default_state(const String default_state)
{
default_state = new_default_state;
this->default_state = default_state;
}
String StateMachine::get_default_state()
{
return default_state;
return this->default_state;
}
void StateMachine::set_current_state(const String new_current_sate)
void StateMachine::set_current_state(const String current_sate)
{
current_state = new_current_sate;
this->current_state = current_sate;
}
String StateMachine::get_current_state()
{
return current_state;
return this->current_state;
}
void StateMachine::set_debug(bool debug)

View File

@@ -74,7 +74,7 @@ namespace godot
return _call(method, Array::make(args...));
}
void set_default_state(const String new_default_state);
void set_default_state(const String default_state);
String get_default_state();
@@ -82,7 +82,7 @@ namespace godot
bool get_debug();
void set_current_state(const String new_current_state);
void set_current_state(const String current_state);
String get_current_state();