MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / getLayer

Method getLayer

Source/Node/TileNode.cpp:729–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727}
728
729Dictionary* TileNode::getLayer(String layerName) const {
730 AssertIf(_flags.isOn(Node::Cleanup), "can not operate on an invalid TileNode");
731 const auto& map = _tmxDef->getMap();
732 tmx::Layer* target = nullptr;
733 for (const auto& layer : map.getLayers()) {
734 if (layerName == layer->getName()) {
735 target = layer.get();
736 break;
737 }
738 }
739 if (!target) {
740 return nullptr;
741 }
742 return getLayerDict(target, map);
743}
744
745NS_DORA_END

Callers 2

tilenode_get_layerFunction · 0.45

Calls 5

getLayerDictFunction · 0.85
isOnMethod · 0.80
getNameMethod · 0.65
getMethod · 0.65
getLayersMethod · 0.45

Tested by

no test coverage detected