/// <summary> /// Constructor fills in the menu contents. /// </summary> public MainMenuScreen(YellokillerGame game) : base(Langue.tr("MainMenuTitle")) { this.game = game; // Create our menu entries. soloMenuEntry = new MenuEntry(Langue.tr("MainMenuSolo")); coopMenuEntry = new MenuEntry(Langue.tr("MainMenuCoop")); editorMenuEntry = new MenuEntry(Langue.tr("MainMenuEditor")); optionsMenuEntry = new MenuEntry(Langue.tr("Options")); scoresMenuEntry = new MenuEntry(Langue.tr("Scores")); helpMenuEntry = new MenuEntry(Langue.tr("Help")); exitMenuEntry = new MenuEntry(Langue.tr("MainMenuQuit")); // Hook up menu event handlers. soloMenuEntry.Selected += SoloMenuEntrySelected; coopMenuEntry.Selected += CoopMenuEntrySelected; editorMenuEntry.Selected += EditorMenuEntrySelected; optionsMenuEntry.Selected += OptionsMenuEntrySelected; scoresMenuEntry.Selected += ScoresMenuEntrySelected; helpMenuEntry.Selected += HelpMenuEntrySelected; exitMenuEntry.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(soloMenuEntry); MenuEntries.Add(coopMenuEntry); MenuEntries.Add(editorMenuEntry); MenuEntries.Add(optionsMenuEntry); MenuEntries.Add(scoresMenuEntry); MenuEntries.Add(helpMenuEntry); MenuEntries.Add(exitMenuEntry); }
public BallParticleSystem(YellokillerGame game, int howManyEffects, Heros heros, Carte carte) : base(game, howManyEffects) { this.heros = heros; this.carte = carte; distance = heros.Distance_Hero_Mur(carte); }
public ExplosionParticleSystem(YellokillerGame game, int howManyEffects, Heros heros, Carte carte, int maxspeed) : base(game, howManyEffects) { this.maxspeed = maxspeed; this.heros = heros; this.carte = carte; distance = heros.Distance_Hero_Mur(carte); }
/// <summary> /// Constructor. /// </summary> public PauseMenuScreen(int comingfrom, int mode, YellokillerGame game) : base(Langue.tr("PauseTitle")) { this.game = game; //Conserve la sélection selectedEntry = comingfrom; mod = mode; lan = Properties.Settings.Default.Language; // Create our menu entries. optionsGameMenuEntry = new MenuEntry(Langue.tr("Options")); if (mode == 2) { resumeGameMenuEntry = new MenuEntry(Langue.tr("PausEditRes")); quitGameMenuEntry = new MenuEntry(Langue.tr("PausEditQuit")); } else { resumeGameMenuEntry = new MenuEntry(Langue.tr("PausGameRes")); quitGameMenuEntry = new MenuEntry(Langue.tr("PausGameQuit")); } // Hook up menu event handlers. resumeGameMenuEntry.Selected += OnCancel; optionsGameMenuEntry.Selected += OptionsMenuEntrySelected; quitGameMenuEntry.Selected += QuitGameMenuEntrySelected; // Add entries to the menu. MenuEntries.Add(resumeGameMenuEntry); if (mode == 2) { saveMapMenuEntry = new MenuEntry(Langue.tr("PausEditSave")); loadMapMenuEntry = new MenuEntry(Langue.tr("PausEditLoad")); deleteMapMenuEntry = new MenuEntry(Langue.tr("PausEditDel")); presetsMenuEntry = new MenuEntry(Langue.tr("Presets")); loadMapMenuEntry.Selected += LoadMapMenuEntrySelected; deleteMapMenuEntry.Selected += DeleteMapMenuEntrySelected; presetsMenuEntry.Selected += PresetsMapMenuEntrySelected; MenuEntries.Add(loadMapMenuEntry); } if (mode != 2) { MenuEntries.Add(optionsGameMenuEntry); MenuEntries.Add(quitGameMenuEntry); } }
public Presets(YellokillerGame game) : base(Langue.tr("Presets")) { this.game = game; F1 = new MenuEntry(Langue.tr("F1")); F2 = new MenuEntry(Langue.tr("F2")); F3 = new MenuEntry(Langue.tr("F3")); F4 = new MenuEntry(Langue.tr("F4")); F5 = new MenuEntry(Langue.tr("F5")); F6 = new MenuEntry(Langue.tr("F6")); F7 = new MenuEntry(Langue.tr("F7")); F8 = new MenuEntry(Langue.tr("F8")); }
public EditorScreen(string nomCarte, YellokillerGame game) { this.game = game; if (nomCarte == "") { nomSauvegarde = nomCarte; compteur = 1; } else { nomSauvegarde = nomCarte.Substring(0, nomCarte.Length - 5); compteur = nomCarte[nomCarte.Length - 6]; extension = nomCarte.Substring(nomCarte.Length - 5); } this.nomCarte = nomCarte; ligne = ""; enableSave = true; afficherMessageErreur = false; afficherMessageSauvegarde = false; camera = new Rectangle(0, 0, 33, 24); carte = new Carte(new Vector2(Taille_Map.LARGEUR_MAP, Taille_Map.HAUTEUR_MAP)); if (nomCarte == "") carte.Initialisation(new Vector2(Taille_Map.LARGEUR_MAP, Taille_Map.HAUTEUR_MAP)); else carte.OuvrirCarte(nomCarte, content); _originesGardes = carte.OriginesGardes; _originesPatrouilleurs = carte.OriginesPatrouilleurs; _originesPatrouilleursAChevaux = carte.OriginesPatrouilleursAChevaux; _origineDark_Hero = carte.OrigineDarkHero; _originesBoss = carte.OriginesBoss; _originesStatues = carte.OriginesStatues; rotationsDesStatues = carte.RotationsDesStatues; bonus = carte.Bonus; interrupteurs = carte.Interrupteurs; munitions = carte.Munitions; origine1 = carte.OrigineJoueur1; origine2 = carte.OrigineJoueur2; enableOrigine1 = (carte.OrigineJoueur1 == -Vector2.One); enableOrigine2 = (carte.OrigineJoueur2 == -Vector2.One); enableDH = (carte.OrigineDarkHero == -Vector2.One); }
public DelMapMenuScreen(YellokillerGame game) : base(Langue.tr("PausEditLoad")) { this.game = game; try { string[] fileEntries = LoadMapMenuScreen.ConcatenerTableaux(Directory.GetFiles(System.Windows.Forms.Application.StartupPath + "\\Levels", "*.solo"), Directory.GetFiles(System.Windows.Forms.Application.StartupPath + "\\Levels", "*.coop")); foreach (string str in fileEntries) { MenuEntry menuEntry = new MenuEntry(str.Substring(str.LastIndexOf('\\') + 1)); menuEntry.Selected += MenuEntrySelected; MenuEntries.Add(menuEntry); } } catch (DirectoryNotFoundException) { } }
/// <summary> /// Constructor. /// </summary> public OptionsMenuScreen(int mode, YellokillerGame game) : base(Langue.tr("Options")) { this.game = game; // Fetches Settings. currentLanguage = Properties.Settings.Default.Language; fullScreen = Properties.Settings.Default.FullScreen; ToggleOK = true; // soundVolume = (uint)(MediaPlayer.Volume * 10); soundVolume = Properties.Settings.Default.MusicVolume; fxVolume = Properties.Settings.Default.FXVolume; mod = mode; // Create our menu entries. languageMenuEntry = new MenuEntry(string.Empty); fullScreenMenuEntry = new MenuEntry(string.Empty); soundVolumeMenuEntry = new MenuEntry(string.Empty); fxVolumeMenuEntry = new MenuEntry(string.Empty); eraseMenuEntry = new MenuEntry(string.Empty); backMenuEntry = new MenuEntry(string.Empty); SetMenuEntryText(); // Hook up menu event handlers. languageMenuEntry.Selected += LanguageMenuEntrySelected; fullScreenMenuEntry.Selected += FullScreenMenuEntrySelected; eraseMenuEntry.Selected += EraseMenuEntrySelected; backMenuEntry.Selected += OnCancel; // Add entries to the menu. MenuEntries.Add(languageMenuEntry); MenuEntries.Add(fullScreenMenuEntry); MenuEntries.Add(soundVolumeMenuEntry); MenuEntries.Add(fxVolumeMenuEntry); MenuEntries.Add(eraseMenuEntry); MenuEntries.Add(backMenuEntry); }
public MoteurParticule(YellokillerGame game, SpriteBatch spriteBatch, Carte carte, Heros heros1, Heros heros2, List<Statue> _statue) { this.game = game; this.spriteBatch = spriteBatch; hadoken_heros1 = new ExplosionParticleSystem(game, 1, heros1, carte, 50); game.Components.Add(hadoken_heros1); ball1 = new BallParticleSystem(game, 1, heros1, carte); game.Components.Add(ball1); foreach (Statue statue in _statue) { explosion_statue = new Statue_Explosion(game, 20, carte, statue, statue.Distance_Statue_Mur(carte)); game.Components.Add(explosion_statue); } fume_hadoken = new ExplosionSmokeParticleSystem(game, 2); game.Components.Add(fume_hadoken); fumigene1 = new Fumigene(game, 9, heros1, carte); game.Components.Add(fumigene1); fume = new SmokePlumeParticleSystem(game, 9); game.Components.Add(fume); try { hadoken_heros2 = new ExplosionParticleSystem(game, 1, heros2, carte, 50); game.Components.Add(hadoken_heros2); ball2 = new BallParticleSystem(game, 1, heros2, carte); fumigene2 = new Fumigene(game, 9, heros2, carte); game.Components.Add(fumigene2); game.Components.Add(ball2); } catch (NullReferenceException) { } }
public GameOverScreen(string comingfrom, YellokillerGame game, uint retries) { this.retries = retries + 1; this.game = game; this.comingfrom = comingfrom; GOmessage = Langue.tr("GOMsg"); //Durée de la transition. TransitionOnTime = TimeSpan.FromSeconds(1.2); TransitionOffTime = TimeSpan.FromSeconds(1.2); // Create our menu entries. restartMenuEntry = new MenuEntry(Langue.tr("GORetry")); chkpointMenuEntry = new MenuEntry(Langue.tr("GOchk")); abortMenuEntry = new MenuEntry(Langue.tr("GOAbort")); // Hook up menu event handlers. restartMenuEntry.Selected += RestartMenuEntrySelected; abortMenuEntry.Selected += AbortMenuEntrySelected; // Add entries to the menu. menuEntries.Add(restartMenuEntry); }
protected ParticleSystem(YellokillerGame game, int howManyEffects) : base(game) { this.game = game; this.howManyEffects = howManyEffects; }
public HelpScreen(YellokillerGame game) { this.game = game; spriteBatch = ScreenManager.spriteBatch; }
public SmokePlumeParticleSystem(YellokillerGame game, int howManyEffects) : base(game,howManyEffects) { }
/// <summary> /// Constructor fills in the menu contents. /// </summary> public LevelSelectSolo(YellokillerGame game) { bool[] unlocked; List<string> storyMissions; List<string> fileEntries; this.game = game; storyMissions = new List<string>(); fileEntries = new List<string>(); foreach (string file in Directory.GetFiles(System.Windows.Forms.Application.StartupPath + "\\Story", "*.solo")) { storyMissions.Add(file); fileEntries.Add(file); } try { foreach (string file in Directory.GetFiles(System.Windows.Forms.Application.StartupPath + "\\Levels", "*.solo")) fileEntries.Add(file); } catch (DirectoryNotFoundException) { } unlocked = new bool[6]; unlocked[0] = Properties.Unlocked.Default.S1; unlocked[1] = Properties.Unlocked.Default.S2; unlocked[2] = Properties.Unlocked.Default.S3; unlocked[3] = Properties.Unlocked.Default.S4; unlocked[4] = Properties.Unlocked.Default.S5; unlocked[5] = Properties.Unlocked.Default.S6; foreach (string str in fileEntries) { string entryName = str.Substring(str.LastIndexOf('\\') + 1); Carte map = new Carte(new Vector2(Taille_Map.LARGEUR_MAP, Taille_Map.HAUTEUR_MAP)); map.OuvrirCartePourMenu(entryName); miniCartes.Add(map); entryName = entryName.Substring(0, entryName.LastIndexOf('.')); MenuEntry menuEntry = new MenuEntry(entryName); if (storyMissions.Contains(str)) menuEntry.IsLocked = !unlocked[(int.Parse(entryName[0].ToString())) - 1]; menuEntry.Selected += LevelMenuEntrySelected; levels.Add(menuEntry); } //Durée de la transition. TransitionOnTime = TimeSpan.FromSeconds(1.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); // Create our menu entries. abortMenuEntry = new MenuEntry(Langue.tr("BckToMenu")); // Hook up menu event handlers. abortMenuEntry.Selected += AbortMenuEntrySelected; // Add entries to the menu. levels.Add(abortMenuEntry); maxpage = (levels.Count - 2) / 8; }
/// <summary> /// Constructor fills in the menu contents. /// </summary> public GameWin(string comingfrom, uint salaire, double levelTime, uint deaths, uint retries, YellokillerGame game) { this.game = game; this.comingfrom = comingfrom; this.salaire = salaire; this.deaths = deaths; this.restart = retries; temps = levelTime; baseSalary = Langue.tr("BaseSalary") + salaire; penalties = Langue.tr("Penalties"); WinMessage = Langue.tr("WinMsg"); time = Langue.tr("Time") + Temps.Conversion(levelTime) + " --> " + (int)(-levelTime * 100); killed = Langue.tr("Killed") + deaths + " x 1 000 --> " + (-deaths * 1000); this.retries = Langue.tr("Retries") + retries + " x 10 000 --> " + (-retries * 10000); this.salaire -= (deaths * 1000) + (uint)(levelTime * 100) + (retries * 10000); if (this.salaire < 0) this.salaire = 0; score = Langue.tr("Score") + this.salaire; string[] fileEntries; try { fileEntries = LoadMapMenuScreen.ConcatenerTableaux(Directory.GetFiles(System.Windows.Forms.Application.StartupPath + "\\Story", "*." + comingfrom.Substring(comingfrom.Length - 4)), Directory.GetFiles(System.Windows.Forms.Application.StartupPath + "\\Levels", "*." + comingfrom.Substring(comingfrom.Length - 4))); } catch (DirectoryNotFoundException) { fileEntries = Directory.GetFiles(System.Windows.Forms.Application.StartupPath + "\\Story", "*." + comingfrom.Substring(comingfrom.Length - 4)); } foreach (string str in Directory.GetFiles(System.Windows.Forms.Application.StartupPath + "\\Story")) { if (str.Substring(str.LastIndexOf('\\') + 1) == comingfrom) { switch (comingfrom.Substring(comingfrom.Length - 4)) { case ("solo"): switch (comingfrom.Substring(comingfrom.LastIndexOf('\\') + 1)[0]) { case ('1'): Properties.Unlocked.Default.S2 = true; break; case ('2'): Properties.Unlocked.Default.S3 = true; break; case ('3'): Properties.Unlocked.Default.S4 = true; break; case ('4'): Properties.Unlocked.Default.S5 = true; break; case ('5'): Properties.Unlocked.Default.S6 = true; break; } break; case ("coop"): switch (comingfrom.Substring(comingfrom.LastIndexOf('\\') + 1)[0]) { case ('1'): Properties.Unlocked.Default.C2 = true; break; case ('2'): Properties.Unlocked.Default.C3 = true; break; case ('3'): Properties.Unlocked.Default.C4 = true; break; case ('4'): Properties.Unlocked.Default.C5 = true; break; case ('5'): Properties.Unlocked.Default.C6 = true; break; } break; } Properties.Unlocked.Default.Save(); } } for (int i = 0; i < fileEntries.Length; i++) { if (fileEntries[i].Substring(fileEntries[i].LastIndexOf('\\') + 1) == comingfrom) { if (i + 1 == fileEntries.Length) next = fileEntries[0].Substring(fileEntries[0].LastIndexOf('\\') + 1); else next = fileEntries[i + 1].Substring(fileEntries[i + 1].LastIndexOf('\\') + 1); break; } } //Durée de la transition. TransitionOnTime = TimeSpan.FromSeconds(1.2); TransitionOffTime = TimeSpan.FromSeconds(1.2); // Create our menu entries. nextMenuEntry = new MenuEntry(Langue.tr("WiNext")); restartMenuEntry = new MenuEntry(Langue.tr("WiRetry")); abortMenuEntry = new MenuEntry(Langue.tr("BckToMenu")); // Hook up menu event handlers. nextMenuEntry.Selected += NextMenuEntrySelected; restartMenuEntry.Selected += RestartMenuEntrySelected; abortMenuEntry.Selected += AbortMenuEntrySelected; // Add entries to the menu. menuEntries.Add(nextMenuEntry); menuEntries.Add(restartMenuEntry); menuEntries.Add(abortMenuEntry); if (this.salaire > S.Default.Score_10) { HiScore = true; } }
public IntroScreen(YellokillerGame game) { this.game = game; VLC = new VideoPlayer(); spriteBatch = ScreenManager.spriteBatch; }
/// <summary> /// Constructor fills in the menu contents. /// </summary> /// public ScoresScreen(YellokillerGame game) : base(Langue.tr("Scores")) { this.game = game; }
public ExplosionSmokeParticleSystem(YellokillerGame game, int howManyEffects) : base(game, howManyEffects) { }
public Fumigene(YellokillerGame game, int howManyEffects, Heros heros, Carte carte) : base(game, howManyEffects) { this.heros = heros; this.carte = carte; }