public void Show_Menu() { FormBorderStyle = FormBorderStyle.SizableToolWindow; Game.Hide(); Garage.Hide(); MenuGame.Show(); MenuGame.BringToFront(); MusicManager.Change_Music("MainMenu"); }
public void Show_Garage() { FormBorderStyle = FormBorderStyle.Sizable; Game.Hide(); MenuGame.Hide(); Garage.Show(); Garage.BringToFront(); MusicManager.Change_Music("Garage"); VoiceManager.Change_Voice("Garage"); }
public void Show_Game() { FormBorderStyle = FormBorderStyle.FixedToolWindow; MenuGame.Hide(); Garage.Hide(); Game.Show(); Game.BringToFront(); Game.Init_Game(); MusicManager.Change_Music("Game"); }
public void Check_Win(float Player_Distance, float Enemy_Distance) { if (string.IsNullOrEmpty(Result) && (Player_Distance > _widthScreen * Distance)) { Result = "Player"; WinAnim.Visible = true; MusicManager.Change_Music("Win"); VoiceManager.Change_Voice("Winner"); } if (string.IsNullOrEmpty(Result) && (Enemy_Distance > _widthScreen * Distance)) { Result = "Enemy "; LoseAnim.Visible = true; MusicManager.Change_Music("GameOver"); VoiceManager.Change_Voice("GameOver"); } }
private void Collision_Handler(string Name1, string Name2) { if ((Name1 == "Player_Car") && (Name2 == "Enemy_Car")) { _playGame = false; SoundManager.Stop_All_Sound(); CollisionManager.Work = false; Breaking_Text.Text = "Crash car"; _finish.LoseAnim.Visible = true; _carPlayer.Freeze = true; _carEnemy.Freeze = true; EndGame_Label.Visible = true; MusicManager.Change_Music("GameOver"); VoiceManager.Change_Voice("GameOver"); SoundManager.Play_Sound("BrokenCar"); AnimationManager.Group_Visible(false, _carPlayer.Car.Id); AnimationManager.Set_Visible(true, _carPlayer.Car.Id + "Breaking"); AnimationManager.Group_Visible(false, _carEnemy.Car.Id); AnimationManager.Set_Visible(true, _carEnemy.Car.Id + "Breaking"); AnimationManager.Set_Visible(false, "PropBoostPlayer"); AnimationManager.Set_Visible(false, "PropBoostEnemy"); } if ((Name1 == "Player_Car") && ((Name2 == "Left_Board") || (Name2 == "Right_Board"))) { _playGame = false; SoundManager.Stop_All_Sound(); CollisionManager.Work = false; Breaking_Text.Text = "Crash Player on border"; _finish.LoseAnim.Visible = true; _carPlayer.Freeze = true; EndGame_Label.Visible = true; MusicManager.Change_Music("GameOver"); VoiceManager.Change_Voice("GameOver"); SoundManager.Play_Sound("BrokenCar"); AnimationManager.Group_Visible(false, _carPlayer.Car.Id); AnimationManager.Set_Visible(true, _carPlayer.Car.Id + "Breaking"); } if ((Name1 == "Enemy_Car") && ((Name2 == "Left_Board") || (Name2 == "Right_Board"))) { _playGame = false; SoundManager.Stop_All_Sound(); CollisionManager.Work = false; Breaking_Text.Text = "Crash Enemy on border"; _finish.WinAnim.Visible = true; _carEnemy.Freeze = true; EndGame_Label.Visible = true; MusicManager.Change_Music("Win"); VoiceManager.Change_Voice("Winner"); SoundManager.Play_Sound("BrokenCar"); AnimationManager.Group_Visible(false, _carEnemy.Car.Id); AnimationManager.Set_Visible(true, _carEnemy.Car.Id + "Breaking"); } }