public HomeLayer() : base(CCColor4B.White) { sprLogo = new CCSprite("logo.png"); AddChild(sprLogo); mniAbout = new CCMenuItemImage(new CCSprite("btnAbout.png"), new CCSprite("btnAboutSelected.png"), delegate(object obj) { GameView.Director.PushScene(AboutLayer.AboutScene(GameView)); }); mniScore = new CCMenuItemImage(new CCSprite("btnScore.png"), new CCSprite("btnScoreSelected.png"), delegate(object obj) { GameView.Director.PushScene(ScoreLayer.ScoreScene(GameView)); }); mniStart = new CCMenuItemImage(new CCSprite("btnStart.png"), new CCSprite("btnStartSelected.png"), delegate(object obj) { GameView.Director.PushScene(GameLayer.GameScene(GameView)); }); mnuMain = new CCMenu(new CCMenuItem[] { mniStart, mniScore, mniAbout }); mnuMain.AlignItemsVertically(MENU_SPACING); AddChild(mnuMain); }
public static CCScene AboutScene(CCGameView gameView) { var scene = new CCScene(gameView); var layer = new AboutLayer(); scene.AddChild(layer); return(scene); }