MCPcopy Create free account
hub / github.com/axmolengine/axmol / absolutePosition

Method absolutePosition

core/2d/ParallaxNode.cpp:129–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129Vec2 ParallaxNode::absolutePosition()
130{
131 Vec2 ret = _position;
132 Node* cn = this;
133 while (cn->getParent() != nullptr)
134 {
135 cn = cn->getParent();
136 ret = ret + cn->getPosition();
137 }
138 return ret;
139}
140
141/*
142The positions are updated at visit because:

Callers 2

addChildMethod · 0.95
visitMethod · 0.95

Calls 2

getParentMethod · 0.45
getPositionMethod · 0.45

Tested by

no test coverage detected