feat: character actor now registers self as player character with game mode

This commit is contained in:
Sara 2024-04-02 22:24:30 +02:00
parent 1095ee24f8
commit 7d227d105b

View file

@ -27,6 +27,8 @@ void CharacterActor::_enter_tree() { GDGAMEONLY();
this->health = this->get_node<Health>("Health");
this->primary_weapon_pool = this->get_node<ProjectilePool>("ProjectilePool");
this->planner = this->get_node<goap::Planner>("Planner");
Ref<TunnelsGameMode> game_mode = GameRoot::get_singleton()->get_game_mode();
game_mode->register_player_character(this);
}
void CharacterActor::_process(double delta_time) { GDGAMEONLY();