From eb4b032b355e7a1477a73fae9ba7a379314c4c4b Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 16 Jun 2017 12:06:49 -0400 Subject: [PATCH] fix losing system --- ShiftOS.WinForms/Applications/Pong.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs index f776ebb..87b7a93 100644 --- a/ShiftOS.WinForms/Applications/Pong.cs +++ b/ShiftOS.WinForms/Applications/Pong.cs @@ -206,6 +206,16 @@ namespace ShiftOS.WinForms.Applications public void Lose() { InitializeCoordinates(); + counterTimer.Stop(); + secondsleft = 60; + level = 1; + speedFactor = 0.0125; + pnlgamestart.Show(); + pnlgamestart.BringToFront(); + pnlgamestart.CenterParent(); + Infobox.Show("You lose.", "You lost the game! Guess you should've cashed out..."); + doAi = false; + doBallCalc = false; } public void LevelComplete() @@ -255,8 +265,6 @@ namespace ShiftOS.WinForms.Applications { ballX = 0; ballY = 0; - xVel = 1; - yVel = 1; opponentY = 0; aiBallX = 0; aiBallY = 0;