public static void UpdateForLander05() { if (Globals.SelectedShip.Fuel > 0) { if (Globals.SpaceKeyDown) { Functions.ApplyDrag(Globals.SelectedShip.Accel * 2, Globals.SelectedShip, Enum.Axis.Vertical); } SoundClass.PlayLooping(Globals.SFXRocketInstance, Globals.UpKeyDown || Globals.LeftKeyDown || Globals.RightKeyDown || Globals.DownKeyDown || Globals.SpaceKeyDown); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, Globals.UpKeyDown || Globals.SpaceKeyDown || Globals.LeftKeyDown || Globals.RightKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, Globals.DownKeyDown, false); } else { SoundClass.Stop(Globals.SFXRocketInstance); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, false, false); } if (!Globals.LeftKeyDown && !Globals.RightKeyDown && (Globals.LeftKeyDownPrevious || Globals.RightKeyDownPrevious)) { Globals.SelectedShip.TextureCurrent = Globals.SelectedShip.Textures[0]; } else if (Globals.LeftKeyDown && !Globals.LeftKeyDownPrevious) { Globals.SelectedShip.TextureCurrent = Globals.SelectedShip.Textures[3]; } else if (Globals.RightKeyDown && !Globals.RightKeyDownPrevious) { Globals.SelectedShip.TextureCurrent = Globals.SelectedShip.Textures[4]; } }
public static void UpdateForLander03() { if (Globals.SelectedShip.Fuel > 0) { if (Globals.SpaceKeyDown) { Globals.SelectedShip.Accel = (Functions.ConvertMpSToVelocity(Globals.SelectedShip.AccelMpS, Globals.TimerInterval, Globals.PixelToMeter) / 2); } else { Globals.SelectedShip.Accel = Functions.ConvertMpSToVelocity(Globals.SelectedShip.AccelMpS, Globals.TimerInterval, Globals.PixelToMeter); } SoundClass.PlayLooping(Globals.SFXRocketInstance, Globals.LeftKeyDown || Globals.RightKeyDown || Globals.UpKeyDown || Globals.DownKeyDown); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, Globals.UpKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteRight, Globals.LeftKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteLeft, Globals.RightKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, Globals.DownKeyDown, false); } else { SoundClass.Stop(Globals.SFXRocketInstance); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteRight, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteLeft, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, false, false); } }
public static void UpdateForLander02() { if (Globals.SelectedShip.Fuel > 0) { if (Globals.SpaceKeyDown) { Globals.SelectedShip.VerticalVelocity -= (Globals.SelectedShip.Accel * 2); } SoundClass.PlayLooping(Globals.SFXRocketInstance, Globals.LeftKeyDown || Globals.RightKeyDown || Globals.UpKeyDown || Globals.DownKeyDown || Globals.SpaceKeyDown); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, Globals.UpKeyDown || Globals.SpaceKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteRight, Globals.LeftKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteLeft, Globals.RightKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, Globals.DownKeyDown, false); } else { SoundClass.Stop(Globals.SFXRocketInstance); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteRight, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteLeft, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, false, false); } if (Globals.SpaceKeyDown && !Globals.SpaceKeyDownPrevious) { Globals.SelectedShip.SpriteBotton.TextureCurrent = Globals.SelectedShip.SpriteBotton.Textures[1]; } else if (!Globals.SpaceKeyDown && Globals.SpaceKeyDownPrevious) { Globals.SelectedShip.SpriteBotton.TextureCurrent = Globals.SelectedShip.SpriteBotton.Textures[0]; } }
public static void UpdateForLander01() { if (Globals.SelectedShip.Fuel > 0) { if (Globals.SpaceKeyDown) { Functions.ApplyDrag(Globals.SelectedShip.Accel * 2, Globals.SelectedShip, Enum.Axis.All); } SoundClass.PlayLooping(Globals.SFXRocketInstance, Globals.LeftKeyDown || Globals.RightKeyDown || Globals.UpKeyDown || Globals.DownKeyDown || Globals.SpaceKeyDown); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, Globals.UpKeyDown || Globals.SpaceKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteRight, Globals.LeftKeyDown || Globals.SpaceKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteLeft, Globals.RightKeyDown || Globals.SpaceKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, Globals.DownKeyDown || Globals.SpaceKeyDown, false); } else { SoundClass.Stop(Globals.SFXRocketInstance); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteRight, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteLeft, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, false, false); } }
public static void ApplyPostStage() { SoundClass.Stop(Globals.SFXRocketInstance); SoundClass.Stop(Globals.SFXFloatInstance); if (Globals.EnterKeyPressed) { if (Globals.GameType == Enum.GameType.Arcade) { if (Globals.Landed) { FunctionsGame.ChangeStage(); } else if (Globals.Collided) { if (Globals.ShipsLeft > 0) { Globals.ShipsLeft--; FunctionsStage.InitializeStage(); } else { Globals.CurrentScene = new Scenes.SceneTitle(); } } } else if (Globals.GameType == Enum.GameType.OreColleting) { if (Globals.Landed) { if (!Globals.SelectedStage.SpriteRedOre.Visible && !Globals.SelectedStage.SpriteGreenOre.Visible && !Globals.SelectedStage.SpriteBlueOre.Visible) { Globals.OreCollected = true; FunctionsGame.RecordFeatures(Enum.RecordType.OreCollected); Globals.CurrentScene = new Scenes.SceneChooseStage(); } else { FunctionsStage.InitializeStage(); } } else { FunctionsStage.InitializeStage(); } } else { FunctionsStage.InitializeStage(); } } }
public static void UpdateForLander06() { if (Globals.SelectedShip.Fuel > 0) { if (Globals.SpaceKeyDown && !Globals.SpaceKeyDownPrevious) { Globals.SelectedShip.HorizontalVelocity *= -0.3F; Globals.SelectedShip.VerticalVelocity *= -0.3F; } SoundClass.PlayLooping(Globals.SFXFloatInstance, Globals.LeftKeyDown || Globals.RightKeyDown || Globals.UpKeyDown || Globals.DownKeyDown); } else { SoundClass.Stop(Globals.SFXFloatInstance); } }
public static void UpdateForLander04() { if (Globals.SelectedShip.Fuel > 0) { if (Globals.SpaceKeyDown) { Globals.SelectedShip.VerticalVelocity = 0; Globals.SelectedShip.HorizontalVelocity = 0; } SoundClass.PlayLooping(Globals.SFXSpecialInstance, Globals.SpaceKeyDown); SoundClass.PlayLooping(Globals.SFXFloatInstance, Globals.LeftKeyDown || Globals.RightKeyDown || Globals.UpKeyDown || Globals.DownKeyDown); } else { SoundClass.Stop(Globals.SFXFloatInstance); SoundClass.Stop(Globals.SFXSpecialInstance); } }
public static void UpdateForLanderX1() { SoundClass.PlayLooping(Globals.SFXSpecialInstance, Globals.SpaceKeyDown); if (Globals.SelectedShip.Fuel > 0) { if (Globals.SpaceKeyDown) { //Cancela acelerações atribuidas if (Globals.LeftKeyDown) { Globals.SelectedShip.HorizontalVelocity += Globals.SelectedShip.Accel; Globals.SelectedShip.Fuel += Globals.SelectedShip.FuelConsumptionRate; } else if (Globals.RightKeyDown) { Globals.SelectedShip.HorizontalVelocity -= Globals.SelectedShip.Accel; Globals.SelectedShip.Fuel += Globals.SelectedShip.FuelConsumptionRate; } if (Globals.UpKeyDown) { Globals.SelectedShip.VerticalVelocity += Globals.SelectedShip.Accel; Globals.SelectedShip.Fuel += Globals.SelectedShip.FuelConsumptionRate; } else if (Globals.DownKeyDown) { Globals.SelectedShip.VerticalVelocity -= Globals.SelectedShip.Accel; Globals.SelectedShip.Fuel += Globals.SelectedShip.FuelConsumptionRate; } } SoundClass.PlayLooping(Globals.SFXFloatInstance, Globals.LeftKeyDown || Globals.RightKeyDown || Globals.UpKeyDown || Globals.DownKeyDown); } else { SoundClass.Stop(Globals.SFXFloatInstance); } }
public static void UpdateForLander07() { if (Globals.SelectedShip.Fuel > 0) { if (Globals.SpaceKeyDown) { Globals.SelectedShip.VerticalVelocity -= Globals.SelectedStage.ConstVForce; } SoundClass.PlayLooping(Globals.SFXRocketInstance, Globals.LeftKeyDown || Globals.RightKeyDown || Globals.UpKeyDown || Globals.DownKeyDown); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, Globals.UpKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteRight, Globals.LeftKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteLeft, Globals.RightKeyDown, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, Globals.DownKeyDown, false); } else { SoundClass.Stop(Globals.SFXRocketInstance); Functions.ApplyFlicker(Globals.SelectedShip.SpriteBotton, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteRight, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteLeft, false, false); Functions.ApplyFlicker(Globals.SelectedShip.SpriteTop, false, false); } }