private TestParticleSystem particleTest(int appWidth, int appHeight) { TestParticleSystem testParticleSystem = new TestParticleSystem(50, new Texture(R.drawable.spark)); testParticleSystem.addGlStatusController(new BlendController(GL_ONE, GL_ONE)); testParticleSystem.setPos(appWidth / 2, appHeight / 2, -100); RotateAnimation rotateAnimation = new RotateAnimation(10000, 0, 360); rotateAnimation.setRotateVector(1, 1, 1); rotateAnimation.setLoop(true); rotateAnimation.setInterpolator(new LinearInterpolator()); testParticleSystem.startAnimation(rotateAnimation); return testParticleSystem; }
private void buttonTest() { final ButtonOverlay btn = new ButtonOverlay(R.drawable.image2, R.drawable.mask2); // btn.setPos(0, btn.getHeight() + 50); RotateAnimation rotate = new RotateAnimation(2000, 0, 360); rotate.setRotateVector(1, 0, 0); rotate.setLoop(true); btn.startAnimation(rotate); btn.addGlStatusController(new CullFaceController(BothSide)); OverlayParent overlayParent = new OverlayParent(); overlayParent.addChild(btn); overlayParent.setPos(btn.getWidth() / 2, btn.getHeight()); addChild(overlayParent); }