| 127 | } |
| 128 | |
| 129 | Vec2 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 | /* |
| 142 | The positions are updated at visit because: |
no test coverage detected