aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-02-24 16:18:57 -0500
committerlempamo <[email protected]>2017-02-24 16:18:57 -0500
commited008c1898ec9dc48d40ad8e6219e4af0e3a31b6 (patch)
treec3dafaa265cdb7f7c39d31db1e331a0ea289b1d3
parent8ca7ea09294b3d47c1724b4a5502b3effcfdefb2 (diff)
parent80282d31c29fb0d9f5d89420186434adfc46f020 (diff)
downloadshiftos_thereturn-ed008c1898ec9dc48d40ad8e6219e4af0e3a31b6.tar.gz
shiftos_thereturn-ed008c1898ec9dc48d40ad8e6219e4af0e3a31b6.tar.bz2
shiftos_thereturn-ed008c1898ec9dc48d40ad8e6219e4af0e3a31b6.zip
Merge remote-tracking branch 'refs/remotes/shiftos-game/master'
-rw-r--r--ShiftOS.WinForms/Applications/Pong.Designer.cs18
-rw-r--r--ShiftOS.WinForms/Applications/Pong.cs13
2 files changed, 12 insertions, 19 deletions
diff --git a/ShiftOS.WinForms/Applications/Pong.Designer.cs b/ShiftOS.WinForms/Applications/Pong.Designer.cs
index 5882549..7f2466f 100644
--- a/ShiftOS.WinForms/Applications/Pong.Designer.cs
+++ b/ShiftOS.WinForms/Applications/Pong.Designer.cs
@@ -555,14 +555,7 @@ namespace ShiftOS.WinForms.Applications
this.paddleHuman.Location = new System.Drawing.Point(10, 134);
this.paddleComputer.MaximumSize = new System.Drawing.Size(20, 150);
this.paddleHuman.Name = "paddleHuman";
- if (ShiftoriumFrontend.UpgradeInstalled("pong_increased_paddle_size"))
- {
- this.paddleHuman.Size = new System.Drawing.Size(20, 150);
- }
- else
- {
- this.paddleHuman.Size = new System.Drawing.Size(20, 100);
- }
+ this.paddleHuman.Size = new System.Drawing.Size(20, 100);
this.paddleHuman.TabIndex = 3;
this.paddleHuman.TabStop = false;
//
@@ -573,14 +566,7 @@ namespace ShiftOS.WinForms.Applications
this.paddleComputer.Location = new System.Drawing.Point(666, 134);
this.paddleComputer.MaximumSize = new System.Drawing.Size(20, 150);
this.paddleComputer.Name = "paddleComputer";
- if (ShiftoriumFrontend.UpgradeInstalled("pong_increased_paddle_size"))
- {
- this.paddleComputer.Size = new System.Drawing.Size(20, 150);
- }
- else
- {
- this.paddleComputer.Size = new System.Drawing.Size(20, 100);
- }
+ this.paddleComputer.Size = new System.Drawing.Size(20, 100);
this.paddleComputer.TabIndex = 1;
//
// lbllevelandtime
diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs
index 7f9a0d6..f7153a1 100644
--- a/ShiftOS.WinForms/Applications/Pong.cs
+++ b/ShiftOS.WinForms/Applications/Pong.cs
@@ -72,6 +72,8 @@ namespace ShiftOS.WinForms.Applications
setuplevelrewards();
}
+
+
// Move the paddle according to the mouse position.
private void pongMain_MouseMove(object sender, MouseEventArgs e)
{
@@ -89,10 +91,15 @@ namespace ShiftOS.WinForms.Applications
paddleComputer.BackColor = SkinEngine.LoadedSkin.ControlTextColor;
paddleHuman.BackColor = SkinEngine.LoadedSkin.ControlTextColor;
-
+ //Check if paddle upgrade has been bought and change paddles accordingly
+ if (ShiftoriumFrontend.UpgradeInstalled("pong_increased_paddle_size"))
+ {
+ paddleHuman.Height = 150;
+ paddleComputer.Height = 150;
+ }
//Set the computer player to move according to the ball's position.
- if(aiShouldIsbeEnabled)
+ if (aiShouldIsbeEnabled)
if (ball.Location.X > 500 - xVel * 10 && xVel > 0)
{
if (ball.Location.Y > paddleComputer.Location.Y + 50)
@@ -245,7 +252,7 @@ namespace ShiftOS.WinForms.Applications
if (this.Left < Screen.PrimaryScreen.Bounds.Width)
{
secondsleft = secondsleft - 1;
- if (secondsleft == 0)
+ if (secondsleft == 1)
{
secondsleft = 60;
level = level + 1;