You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can nest entities inside eachother and move the parent entity's sprite.
var myEntity = new Entity()
.add(new FillSprite(0x154d79, 100, 100)); // blue square
var myNestedEntity = new Entity()
.add(new FillSprite(0xefbf74, 40, 40)); // orange square
System.root.addChild(myEntity);
myEntity.addChild(myNestedEntity);
// move container using sine motion. the child entity automatically follows
myEntity.get(Sprite).x.behavior = new Sine(0, 200, 2);
Hi,
Is there a way to move / modify all the contents of an entity instead of moving / modifying them individually.
Thanks.
The text was updated successfully, but these errors were encountered: