From 9e933f608d923826531d3f20a745f61ee43afa06 Mon Sep 17 00:00:00 2001 From: Hady Helal Date: Mon, 16 Nov 2020 18:15:05 +0200 Subject: [PATCH] Modify The Impulse of the bird MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modify the bird’s jumb to satisfy the player condition to got high score. --- FlappyBird/GameScene.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlappyBird/GameScene.swift b/FlappyBird/GameScene.swift index af93d4d..d1f2c0e 100644 --- a/FlappyBird/GameScene.swift +++ b/FlappyBird/GameScene.swift @@ -208,7 +208,7 @@ class GameScene: SKScene, SKPhysicsContactDelegate{ if moving.speed > 0 { for _ in touches { // do we need all touches? bird.physicsBody?.velocity = CGVector(dx: 0, dy: 0) - bird.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 30)) + bird.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 22)) } } else if canRestart { self.resetScene()