aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/Pong.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-06-16 12:06:49 -0400
committerMichael <[email protected]>2017-06-16 12:06:49 -0400
commiteb4b032b355e7a1477a73fae9ba7a379314c4c4b (patch)
treeba0eb8dd6b1d01cbc0af250a708f748b0e0c9b91 /ShiftOS.WinForms/Applications/Pong.cs
parentbbbc00f204f77ca547340b010ec21662a62e3203 (diff)
downloadshiftos_thereturn-eb4b032b355e7a1477a73fae9ba7a379314c4c4b.tar.gz
shiftos_thereturn-eb4b032b355e7a1477a73fae9ba7a379314c4c4b.tar.bz2
shiftos_thereturn-eb4b032b355e7a1477a73fae9ba7a379314c4c4b.zip
fix losing system
Diffstat (limited to 'ShiftOS.WinForms/Applications/Pong.cs')
-rw-r--r--ShiftOS.WinForms/Applications/Pong.cs12
1 files 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;