| 38 | static const std::string attack_getter_empty_material_event = ""; |
| 39 | |
| 40 | bool AttackScriptGetter::Load(std::string _path) { |
| 41 | if (_path.empty()) { |
| 42 | return false; |
| 43 | } |
| 44 | path_ = _path; |
| 45 | if (_path[_path.size() - 2] == ' ' && |
| 46 | _path[_path.size() - 1] == 'm') { |
| 47 | mirror_ = true; |
| 48 | _path.resize(_path.size() - 2); |
| 49 | } else { |
| 50 | mirror_ = false; |
| 51 | } |
| 52 | // Attacks::Instance()->ReturnRef(_path); |
| 53 | attack_ref_ = Engine::Instance()->GetAssetManager()->LoadSync<Attack>(_path); |
| 54 | return true; |
| 55 | } |
| 56 | |
| 57 | std::string AttackScriptGetter::GetUnblockedAnimPath() { |
| 58 | return attack_ref_.valid() ? attack_ref_->unblocked_anim_path : attack_getter_empty_path; |
no test coverage detected