/// <summary> /// Callback for if the player doesn't get the target node in time /// </summary> public void FailedTarget(float _distance) { MyGameManager.NormalizeTime(); Bomb bomb = SpawnBomb(bombPrefab, targetLocation); float offSetRange = 3f * (_distance + 0.15f); float x = Random.Range(-offSetRange, offSetRange); float y = Random.Range(-offSetRange, offSetRange); bomb.transform.Translate(x, y, 0f); shooting = false; foreach (Transform child in MyGameManager.TargettingNodes) { Destroy(child.gameObject); } TargettingLine.gameObject.SetActive(false); MyGameManager.IncreaseScore((int)((1f - _distance) * 10f)); int resultText = 2; if (_distance > 0.8f) { resultText = 0; } else if (_distance > 0.5f) { resultText = 1; } ParticleText text = Instantiate(particleTextPrefab, textSpawnLocation.position, Quaternion.identity).GetComponent <ParticleText>(); text.SetText(TargettingLineResults[resultText]); targetLocationCursor.Stop(); finishTargetSound.Play(); }
public override void LoadContent(ContentManager Content) { base.LoadContent(Content); // Load our particle text font. font = Content.Load <SpriteFont>("Fuentes/fuenteSplashScreen"); ParticleTextTexture = Content.Load <Texture2D>("TextParticle"); AudioManager.PlaySoundtrack("splash_sound"); var view = graphics.GraphicsDevice.Viewport; particleText = new ParticleText(graphics.GraphicsDevice, font, "Abandagi", ParticleTextTexture); }
public override void LoadContent() { if (content == null) { content = new ContentManager(ScreenManager.Game.Services, "Content"); } //todo Vector2 screenSize; //position of particle text screenSize = new Vector2(ScreenManager.GraphicsDevice.Viewport.Width, ScreenManager.GraphicsDevice.Viewport.Height - 400); particleFont = content.Load <SpriteFont>(@"Graphics\arialblack50"); ParticleTextTexture = content.Load <Texture2D>(@"Graphics\TextParticle"); particleText = new ParticleText(ScreenManager.GraphicsDevice, particleFont, "Saturn's Turn", ParticleTextTexture, 2.0f, screenSize); }
public override void LoadContent() { if (content == null) { content = new ContentManager(ScreenManager.Game.Services, "Content"); } //todo Vector2 screenSize; //position of particle text screenSize = new Vector2(ScreenManager.GraphicsDevice.Viewport.Width, ScreenManager.GraphicsDevice.Viewport.Height - 400); particleFont = content.Load <SpriteFont>(@"Graphics\ParticleFont50"); ParticleTextTexture = content.Load <Texture2D>(@"Graphics\TextParticle"); particleText = new ParticleText(ScreenManager.GraphicsDevice, particleFont, "Saturn's Turn 2", ParticleTextTexture, 2.0f, screenSize); // titlesong = content.Load<Song>(@"Sounds\titlesmusic"); // MediaPlayer.Play(titlesong); }
/// <summary> /// Callback for when the player selects the final node /// </summary> public void SuccessfulTarget() { SpawnBomb(bombPrefab, targetLocation); shooting = false; foreach (Transform child in MyGameManager.TargettingNodes) { Destroy(child.gameObject); } TargettingLine.gameObject.SetActive(false); MyGameManager.IncreaseScore(25); ParticleText text = Instantiate(particleTextPrefab, textSpawnLocation.position, Quaternion.identity).GetComponent <ParticleText>(); text.SetText(TargettingLineResults[3]); targetLocationCursor.Stop(); coolDownTimer = 0f; finishTargetSound.Play(); }
public CreditsCutscene(WorldBase returnTo) : base("Content\\Cutscene\\creditsCutScene\\cutsceneCreditWorld", returnTo) { decorator.ambientSoundManager.requestMusicStop(); int distanceBetweenCreditEntries = 150; SoundEffect music = content.Load <SoundEffect>("Sounds/Music/credits_0"); musicInstance = music.CreateInstance(); musicInstance.Volume = MetaData.audioSettingMusic; List <String> creditsString = new List <string>(); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add(""); creditsString.Add("Credits"); creditsString.Add(" Programming, Design"); creditsString.Add("Samuel Richardson"); creditsString.Add(""); creditsString.Add(" Art"); creditsString.Add("Alexander 'Brotenko' Fassbender"); creditsString.Add("Aaron Richardson"); creditsString.Add("Samuel Richardson"); creditsString.Add(""); creditsString.Add(" Music"); creditsString.Add("Aaron Richardson"); creditsString.Add(""); creditsString.Add(" Special Thanks"); creditsString.Add(""); //creditsString.Add("All the people who played my game before release,\nwho put up with bugs and incomplete design,\nyou helped make the game what it is today.\n\nYou people are awesome."); creditsString.Add("You people are awesome.\n\nyou helped make the game what it is today.\nwho put up with bugs and incomplete design,\nAll the people who played my game before release,"); creditsString.Add(""); creditsString.Add("Sven 'Hoxeel' Lewandowski"); creditsString.Add("Family and Friends"); creditsString.Add("My local library"); creditsString.Add("Even though missing someone was inevitable, I'm sorry.\nSpecial Thanks to the person(s) I forgot to credit."); creditsString.Add(""); creditsString.Add("with my game.\ndear player, for spending time\n...and special thanks to you,"); creditsString.Add(""); int counter = 0; foreach (string credit in creditsString) { ParticleText text = new ParticleText(new Vector2(-300, distanceBetweenCreditEntries * -counter), this, int.MaxValue, credit); //text.drawContrast = true; text.font = content.Load <SpriteFont>("Temp_2"); addEntity(text); counter++; } cutsceneDuration = creditsString.Count * 125; cameraCommands.Add(new MovementCommand(new Vector2(0, -400), new Vector2(0, -400), 350)); cameraCommands.Add(new MovementCommand(new Vector2(0, -400), new Vector2(0, -400 + -distanceBetweenCreditEntries * creditsString.Count - 1200), creditsString.Count * 130)); AnimatedEntity animatedPlayer = new AnimatedEntity(); AnimatedEntity animatedFather = new AnimatedEntity(); AnimatedEntity animatedMother = new AnimatedEntity(); AnimatedEntity animatedSister = new AnimatedEntity(); animatedEntities.Add(animatedPlayer); animatedEntities.Add(animatedFather); animatedEntities.Add(animatedMother); animatedEntities.Add(animatedSister); animatedPlayer.animations.Add(new Animation(7 * 7, 500, Game1.player_default_animations.runTex, true)); animatedPlayer.animations[0].drawFlipped = true; animatedPlayer.movement.Add(new MovementCommand(new Vector2(-1000, 27), new Vector2(-50, 27), 500)); animatedSister.animations.Add(new Animation(7 * 7, 500, Game1.player_girl_animations.runTex, true)); animatedSister.animations[0].drawFlipped = true; animatedSister.movement.Add(new MovementCommand(new Vector2(-1100, 25), new Vector2(-100, 25), 500)); animatedMother.animations.Add(new Animation(40, 50, content.loadTextureRange("Cutscene/StartingCutscene/mother_stand_", 0), true)); animatedMother.movement.Add(new MovementCommand(new Vector2(100, 27), new Vector2(100, 27), 500)); animatedFather.animations.Add(new Animation(40, 500, content.loadTextureRange("Cutscene/StartingCutscene/father_guitar_", 4), true)); animatedFather.movement.Add(new MovementCommand(new Vector2(-100, 27), new Vector2(-100, 27), 500)); EntityFire fire = new EntityFire(new Vector2(0, 47), this); entities.Add(fire); //timeIncrement = .0003f; }