feat: implementations of initial weapon inventory interface
This commit is contained in:
parent
6cdb2cbd4f
commit
6fa9d11af5
12 changed files with 126 additions and 11 deletions
|
|
@ -39,6 +39,8 @@ void Rifle::ready() {
|
|||
get_anim()->animation_set_next("fire_aim", "aim");
|
||||
get_anim()->animation_set_next("aim_to_hip", "RESET");
|
||||
get_anim()->animation_set_next("fire_hip", "RESET");
|
||||
get_anim()->animation_set_next("equip", "RESET");
|
||||
get_anim()->play("equip");
|
||||
}
|
||||
|
||||
void Rifle::process(double delta) {
|
||||
|
|
@ -74,3 +76,12 @@ void Rifle::_notification(int what) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bool Rifle::allows_running() const {
|
||||
String const animation{ get_anim()->get_current_animation() };
|
||||
return animation.is_empty();
|
||||
}
|
||||
|
||||
void Rifle::notify_selected() {
|
||||
get_anim()->play("equip");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue