Skip to content

Commit 054334a

Browse files
committed
children get parent settings
1 parent 0cd535b commit 054334a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/JavaGameEngine/Components/Component.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@ public void update() {
206206
float y = (parent.getPosition().getY()-((getScale().getY()/2)));
207207

208208
setPosition(new Vector2(x,y).add(getLocalPosition())); // we get the parents position and we add our localPosition
209-
/* update this in the setScale and setRotation instead
210-
setRotation(parent.getRotation().add(getLocalRotation()));
211-
setScale(parent.getScale().add(getLocalScale()));
212-
*/
209+
// update this in the setScale and setRotation instead
210+
setRotation(parent.getRotation().add(getLocalRotation()));
211+
setScale(parent.getScale().add(getLocalScale()));
212+
213213

214214
}
215215
if(components.size()>0){

0 commit comments

Comments
 (0)