GamestartLayer.clsss:
public class GamestartLayer extends CCColorLayer {
CCSprite ss;
float movement;
CGSize winSize = CCDirector.sharedDirector().displaySize();
protected GamestartLayer(ccColor4B color) {
super(color);
// TODO Auto-generated constructor stub
this.setIsTouchEnabled(true);
ss=CCSprite.sprite("ant_1_1.png");
ss.setPosition(CGPoint.ccp(768*0.5f, 1024*0.5f));
this.addChild(ss,5);
this.setIsAccelerometerEnabled(true);
this.schedule("gameLogic");
CCParticleSystem fire=CCParticleFire.particleWithFile("Rocketfire2.plist");
fire.setPosition(CGPoint.ccp(winSize.width/2.0f, winSize.height/2.0f));
this.addChild(fire);
}
public static CCScene scene() {
// TODO Auto-generated method stub
CCScene scene = CCScene.node();
GamestartLayer layer = new GamestartLayer(ccColor4B.ccc4(225, 225,225, 225));
//adds layer to scene
scene.addChild(layer);
return scene;
}
}