public void passToGame(int i) { GameData.scores = new int[GameData.players]; CCSimpleAudioEngine.SharedEngine.StopEffect(mid); var newScene = new CCScene(Window); if(i == 1) { var silla = new SillaMusicalLayer(); newScene.AddChild(silla); Window.DefaultDirector.ReplaceScene(newScene); } else if (i == 2) { var dictado = new DictadoLayercs(); newScene.AddChild(dictado); Window.DefaultDirector.ReplaceScene(newScene); } else if (i == 3) { var maleta = new MaletaLayer(); newScene.AddChild(maleta); Window.DefaultDirector.ReplaceScene(newScene); } else { var tablero = new Tablero(); newScene.AddChild(tablero); Window.DefaultDirector.ReplaceScene(newScene); } }
private void GoToMiniJuego() { CCSimpleAudioEngine.SharedEngine.StopAllEffects(); int go_to = random.Next(1, 4); CCScene newScene = new CCScene(Window); CCLayer nextLayer; CCSimpleAudioEngine.SharedEngine.PlayEffect("sounds/chooce"); newScene = new CCScene(Window); switch (go_to) { case (1): nextLayer = new SillaMusicalLayer(); break; case (2): nextLayer = new DictadoLayercs(); break; default: nextLayer = new MaletaLayer(); break; } newScene.AddChild(nextLayer); Window.DefaultDirector.ReplaceScene(newScene); }