diff --git a/TouchBreakout/GameScene.swift b/TouchBreakout/GameScene.swift
index f4b8f94..f6c4f79 100644
--- a/TouchBreakout/GameScene.swift
+++ b/TouchBreakout/GameScene.swift
@@ -104,6 +104,8 @@ class GameScene: SKScene {
ball.physicsBody?.velocity = .zero
velocityDx = 0.0
velocityDy = 0.0
+ isLeftPressed = false
+ isRightPressed = false
removedBlocks.forEach { self.addChild($0) }
removedBlocks.removeAll()
}
@@ -120,6 +122,8 @@ class GameScene: SKScene {
velocityDx = ball.physicsBody?.velocity.dx ?? 0.0
velocityDy = ball.physicsBody?.velocity.dy ?? 0.0
ball.physicsBody?.velocity = .zero
+ isLeftPressed = false
+ isRightPressed = false
gameState = .paused
}
}
@@ -127,6 +131,8 @@ class GameScene: SKScene {
private func continueGame() {
if gameState == .paused {
ball.physicsBody?.velocity = CGVector(dx: velocityDx, dy: velocityDy)
+ isLeftPressed = false
+ isRightPressed = false
gameState = .running
}
}
@@ -218,8 +224,8 @@ class GameScene: SKScene {
}
// if too horizontal...
- if fabs(Double((ball.physicsBody?.velocity.dy)!)) < 30 {
- ball.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 2))
+ if fabs(Double((ball.physicsBody?.velocity.dy)!)) < 20 {
+ ball.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 1))
}
}
}
diff --git a/TouchBreakout/Info.plist b/TouchBreakout/Info.plist
index 644a773..273bfc8 100644
--- a/TouchBreakout/Info.plist
+++ b/TouchBreakout/Info.plist
@@ -17,9 +17,9 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.0.1
+ 1.1
CFBundleVersion
- 1
+ 9
LSApplicationCategoryType
public.app-category.games
LSMinimumSystemVersion