charanjib / cocos2d-android

Automatically exported from code.google.com/p/cocos2d-android
Other
0 stars 0 forks source link

Elastic and Ease actions are broken #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This code (commented out in MenuTest) doesn't seem to work:

            CCSize s = Director.sharedDirector().winSize();
            int i = 0;
            for (CocosNode child : menu.getChildren()) {
                int offset = (int) (s.width / 2 + 50);
                if (i % 2 == 0)
                    offset = -offset;
                child.setPosition(child.getPositionX() + offset, child.getPositionY());
                child.runAction(EaseElasticOut.action(MoveBy.action(2, child.getPositionX() - offset, 0), 
0.35f));
                i++;
            }

This should be fairly easy to fix.

Original issue reported on code.google.com by philip.desegur@gmail.com on 18 Jan 2010 at 2:54

GoogleCodeExporter commented 8 years ago
Fixed in latest build. Added a demo to test visually.

Original comment by philip.desegur@gmail.com on 30 Jan 2010 at 7:03