I have 2 sprites, I would like to move both of them, when I touched sprite A and moved it, sprite B will be moved also without touching sprite B at the same time. thanks for the help
here is the code
I have 2 sprites, I would like to move both of them, when I touched sprite A and moved it, sprite B will be moved also without touching sprite B at the same time. thanks for the help
here is the code
center = new AnimatedSprite(0, 0, resourcesManager.interact, vbom) {
@Override public boolean onAreaTouched(final TouchEvent pSceneTouchEvent,final float pTouchAreaLocalX, final float pTouchAreaLocalY)
{
//SPrite A
this.setPosition(pSceneTouchEvent.getX() - this.getWidth() / 2,
pSceneTouchEvent.getY() - this.getHeight() / 2);
//Sprite B
return true;
}
};