Beispiel #1
0
 public Menu(ContentManager Content, SpriteBatch spriteBatch)
 {
     menuTexture = new AnimatedSprite(Content.Load<Texture2D>("Graphics\\MainMenu"), 3, 2, animationSpeed);
     startButton = new Button(new Vector2(startButtonLX, startButtonLY),
         new Vector2(startButtonRX, startButtonRY), "", Vector2.Zero);
     controlsButton = new Button(new Vector2(controlsButtonLX, controlsButtonLY),
         new Vector2(controlsButtonRX, controlsButtonRY), "", Vector2.Zero);
     skipButton = new Button(new Vector2(skipButtonLX, skipButtonLY),
         new Vector2(skipButtonRX, skipButtonRY), "", Vector2.Zero);
     buttonList = new List<Button>() { startButton, skipButton, controlsButton };
     buttonListHover = new List<bool>() { hoverFlag, hoverFlagSkip, hoverFlagControls };
     pixel = new Texture2D(spriteBatch.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
     pixel.SetData(new[] { Color.White });
     isInControllerMenu = false;
     controllerMenu = new ControllerMenu(Content, spriteBatch);
     selectedButton = 0;
     menuBgm = (Content.Load<SoundEffect>("Music\\Cylinder_Eight.wav")).CreateInstance();
     windEffectInstance = (Content.Load<SoundEffect>("Music\\Wind.wav")).CreateInstance();
     flagEffectInstance = (Content.Load<SoundEffect>("Music\\Flag.wav")).CreateInstance();
     scrollClickEffectInstance = (Content.Load<SoundEffect>("Music\\Click.wav")).CreateInstance();
     confirmClickEffectInstance = (Content.Load<SoundEffect>("Music\\Click2.wav")).CreateInstance();
     menuBgm.IsLooped = true;
     menuBgm.Play();
     windEffectInstance.IsLooped = true;
     windEffectInstance.Volume = windVolume;
     flagEffectInstance.IsLooped = true;
     flagEffectInstance.Volume = flagVolume;
     scrollClickEffectInstance.Volume = clickVolume;
     confirmClickEffectInstance.Volume = clickVolume;
     windEffectInstance.Play();
     flagEffectInstance.Play();
 }
 public ControllerMenu(ContentManager Content, SpriteBatch spriteBatch)
 {
     menuTexture = Content.Load<Texture2D>("Graphics\\Menu");
     controllerMenuTexture = Content.Load<Texture2D>("Graphics\\ControllerMenu");
     backButton = new Button(new Vector2(startButtonLX, startButtonLY),
         new Vector2(startButtonRX, startButtonRY), "", Vector2.Zero);
     pixel = new Texture2D(spriteBatch.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
     pixel.SetData(new[] { Color.White });
 }
Beispiel #3
0
 public void Initialize(ContentManager content)
 {
     scavengerShotSound = (content.Load<SoundEffect>("Music\\shotWithGrunt.wav")).CreateInstance();
     enemyShotSound = (content.Load<SoundEffect>("Music\\BulletBodyImpact.wav")).CreateInstance();
     headshotSound = (content.Load<SoundEffect>("Music\\Headshotsound.wav")).CreateInstance();
     radioTexture = content.Load<Texture2D>("Graphics\\radio");
     conversationManager = new ConversationManager();
     conversationManager.Initialize(content, this);
     delegateToConvo = false;
     waves = new List<Wave>();
     currentWave = 0;
     State = 0;
     waves.Add(new TutorialWave1());
     waves.Add(new TutorialWave2());
     waves.Add(new TutorialWave3());
     waves.Add(new FoxholeDemoWave1());
     waves.Add(new FoxholeDemoWave2());
     waves.Add(new TowerDemoWave1());
     waves.Add(new TowerDemoWave2());
     waves.Add(new LadderDemoWave1());
     waves.Add(new LadderDemoWave2());
     //waves.Add(new LadderWave1());
     //waves.Add(new LadderWave2());
     //waves.Add(new LadderWave3());
     //waves.Add(new FoxholeWave1());
     //waves.Add(new FoxholeWave2());
     //waves.Add(new FoxholeWave3());
     //waves.Add(new TowerWave1());
     //waves.Add(new TowerWave2());
     //waves.Add(new TowerWave3());
     for (int i = 0; i < waves.Count; i++)
     {
         waves[i].Initialize(content, this);
     }
     blankScreen = content.Load<Texture2D>("Graphics\\BlackScreen");
     continueButton = new Button(new Vector2(startButtonLX, startButtonLY),
         new Vector2(startButtonRX, startButtonRY), buttonText, continueTextOffset);
     endGracePeriod = 0;
     secondsLeft = (int) (gracePeriodLength / 1000);
     getWave().applyModes();
 }
 public void Initialize(ContentManager content, WaveManager waveManager)
 {
     manager = waveManager;
     menNames = sampleNames;
     State = 0;
     conversationIsFinished = false;
     deathThisRound = false;
     lastNumScavengers = -1;
     portraits = new List<Texture2D>();
     portraits.Add(content.Load<Texture2D>("Graphics\\Andy"));
     portraits.Add(content.Load<Texture2D>("Graphics\\Evan"));
     portraits.Add(content.Load<Texture2D>("Graphics\\Bill"));
     portraits.Add(content.Load<Texture2D>("Graphics\\Paul"));
     talkToButtons = new List<Button>();
     talkToButtonsHover = new List<bool>();
     talkAboutButtons = new List<Button>();
     talkAboutButtonsHover = new List<bool>();
     possibleResponses = new List<String>();
     endConversationButton = new Button(endConversationL, endConversationR, endConversationText, endConversationOffset);
     endConversationHover = false;
 }