MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / Load

Method Load

Source/Game/attackscript.cpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38static const std::string attack_getter_empty_material_event = "";
39
40bool 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
57std::string AttackScriptGetter::GetUnblockedAnimPath() {
58 return attack_ref_.valid() ? attack_ref_->unblocked_anim_path : attack_getter_empty_path;

Callers 1

ASLoadFunction · 0.45

Calls 4

GetAssetManagerMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected