public static CCScene ToScene(this CCLayer layer, CCWindow window) { var scene = new CCScene(window); scene.AddChild(layer); return(scene); }
public static CCScene GameScene(GameLayer sender, CCWindow window, CardBase[] cards) { var scene = new CCScene(window); var layer = new ChooseCardLayer(sender, cards); scene.AddChild(layer); return(scene); }
//--------------------------------------------------------------------------------------------------------- // CreateScene //--------------------------------------------------------------------------------------------------------- // //--------------------------------------------------------------------------------------------------------- public static CCScene CreateScene(CCWindow mainWindow, int score, Player currentPlayer, bool levelPassed, int coinsEarned, Level theLastLevelPlayed) { var scene = new CCScene(mainWindow); var layer = new ChallengeLevelFinishedLayer(score, currentPlayer, levelPassed, coinsEarned, theLastLevelPlayed); scene.AddChild(layer); return(scene); }
//--------------------------------------------------------------------------------------------------------- // CreateScene //--------------------------------------------------------------------------------------------------------- public static CCScene CreateScene(CCWindow mainWindow, int score, Player currentPlayer, Level gameLevel, bool levelPassed, int coinsEarned) { var scene = new CCScene(mainWindow); var layer = new TutorialLevelFinishedLayer(score, currentPlayer, gameLevel, levelPassed, coinsEarned); scene.AddChild(layer); return(scene); }
public static CCScene SceneWithWinner(CCWindow mainWindow, Board.State?winner) { var scene = new CCScene(mainWindow); var layer = new GameOverLayer(winner); scene.AddChild(layer); return(scene); }
public static CCScene CreateScene(CCWindow mainWindow, bool startGameAfter = false) { var scene = new CCScene(mainWindow); var layer = new GameTutorialLayer(startGameAfter); scene.AddChild(layer); return(scene); }
internal static CCScene GameScene(CCWindow window) { var scene = new CCScene(window); var layer = new GameLayer(); scene.AddChild(layer); return(scene); }
public static CCScene GameScene(CCWindow window, int redScore, int blueScore) { var scene = new CCScene(window); var layer = new GameOverLayer(redScore, blueScore); scene.AddChild(layer); return(scene); }
public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow) { SharedWindow = mainWindow; DefaultResolution = new CCSize( application.MainWindow.WindowSizeInPixels.Width, application.MainWindow.WindowSizeInPixels.Height); application.ContentRootDirectory = "Content"; CCScene scene = new CCScene(mainWindow); CCLayer layer = new IntroLayer(DefaultResolution); var b = new CozyColorSampleButton(100, 100, 158, 158) { NormalColor = new CCColor4B(255, 0, 0), ClickedColor = new CCColor4B(0, 255, 0), Text = "Hello Bttton", HasBorder = true, }; b.OnClick += () => { }; var list = new CozySampleListView() { ContentSize = new CCSize(350, 350), Orientation = ControlOrientation.Vertical, Position = new CCPoint(100, 100), HasBorder = true, }; layer.AddChild(list); list.AddItem(new CozySampleListViewItemSprite(new CCSprite("gold")) { MarginBottom = 10, MarginTop = 10, HasBorder = true, }); list.AddItem(b); list.AddItem(new CozySampleListViewItemSprite(new CCSprite("gold")) { MarginBottom = 10, MarginTop = 10, HasBorder = true, }); layer.AddEventListener(b.EventListener, layer); scene.AddChild(layer); mainWindow.RunWithScene(scene); }
public GameScene(CCWindow mainWindow) : base(mainWindow) { CreateLayers(); CreateHud(); GoToLevel(LevelManager.Self.CurrentLevel); Schedule(PerformActivity); }
public static CCScene Scene(CCWindow window) { var scene = new CCScene(window); var layer = new TestLayer1(); scene.AddChild(layer); return(scene); }
public override void ApplicationDidFinishLaunching(CCApplication application, CCWindow mainWindow) { application.ContentRootDirectory = "Content"; sharedWindow = mainWindow; var introScene = IntroLayer.CreateScene(mainWindow); sharedWindow.RunWithScene(introScene); }