diff --git a/Penguin Train.xcodeproj/project.xcworkspace/xcuserdata/victor.xcuserdatad/UserInterfaceState.xcuserstate b/Penguin Train.xcodeproj/project.xcworkspace/xcuserdata/victor.xcuserdatad/UserInterfaceState.xcuserstate index e27d5c4..70e1e57 100644 Binary files a/Penguin Train.xcodeproj/project.xcworkspace/xcuserdata/victor.xcuserdatad/UserInterfaceState.xcuserstate and b/Penguin Train.xcodeproj/project.xcworkspace/xcuserdata/victor.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Penguin Train.xcodeproj/xcuserdata/victor.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Penguin Train.xcodeproj/xcuserdata/victor.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index baaf351..3ee70dc 100644 --- a/Penguin Train.xcodeproj/xcuserdata/victor.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Penguin Train.xcodeproj/xcuserdata/victor.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -41,7 +41,7 @@ endingColumnNumber = "9223372036854775807" startingLineNumber = "220" endingLineNumber = "220" - landmarkName = "-adViewDidReceiveAd:" + landmarkName = "-messageReciever:" landmarkType = "5"> </BreakpointContent> </BreakpointProxy> diff --git a/Penguin Train/Base.lproj/Main.storyboard b/Penguin Train/Base.lproj/Main.storyboard index 86dd62f..42f6429 100644 --- a/Penguin Train/Base.lproj/Main.storyboard +++ b/Penguin Train/Base.lproj/Main.storyboard @@ -9,7 +9,7 @@ <objects> <viewController id="SCk-n3-8qX" customClass="EasterEggViewController" sceneMemberID="viewController"> <view key="view" contentMode="scaleToFill" id="DI0-D8-HST"> - <rect key="frame" x="0.0" y="0.0" width="320" height="480"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="GGj-Ds-oXJ"> @@ -97,20 +97,19 @@ Dedikerat till världens mest awesome pingvin på hennes 20 års-dag den 12 mars <objects> <viewController id="LVB-YS-i5n" customClass="ViewController" sceneMemberID="viewController"> <view key="view" contentMode="scaleToFill" id="bdc-N1-crn"> - <rect key="frame" x="0.0" y="0.0" width="320" height="480"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <subviews> <view contentMode="scaleToFill" id="ZNx-X2-eTZ" userLabel="GameScene" customClass="SKView"> - <rect key="frame" x="0.0" y="0.0" width="320" height="431"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" heightSizable="YES"/> <subviews> <view hidden="YES" contentMode="scaleToFill" id="EAo-xi-VsI" userLabel="highscore"> - <rect key="frame" x="0.0" y="0.0" width="320" height="431"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" id="RVX-Lv-C69"> - <rect key="frame" x="0.0" y="99" width="320" height="234"/> - <autoresizingMask key="autoresizingMask"/> + <rect key="frame" x="0.0" y="167" width="320" height="234"/> <subviews> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Penguin dance!" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ma1-zs-NWM"> <rect key="frame" x="20" y="20" width="280" height="31"/> @@ -156,17 +155,11 @@ Dedikerat till världens mest awesome pingvin på hennes 20 års-dag den 12 mars </subviews> <color key="backgroundColor" red="0.83137261870000001" green="0.86274516580000005" blue="0.87843143940000001" alpha="1" colorSpace="deviceRGB"/> </view> - <view contentMode="scaleToFill" id="7wa-9Y-d3W" userLabel="AdView"> - <rect key="frame" x="0.0" y="430" width="320" height="50"/> - <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/> - <color key="backgroundColor" red="0.74901962280000001" green="0.77647066119999997" blue="0.78823536630000002" alpha="1" colorSpace="deviceRGB"/> - </view> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> </view> <navigationItem key="navigationItem" id="h53-7o-dYe"/> <connections> - <outlet property="adView" destination="7wa-9Y-d3W" id="wra-SW-332"/> <outlet property="gameSection" destination="ZNx-X2-eTZ" id="Ezr-7Q-ksW"/> <outlet property="highscoreLabel" destination="qAd-OI-gGc" id="S9n-ha-8wI"/> <outlet property="highscoreView" destination="EAo-xi-VsI" id="II4-6u-uKA"/> @@ -182,7 +175,7 @@ Dedikerat till världens mest awesome pingvin på hennes 20 års-dag den 12 mars <objects> <viewController storyboardIdentifier="introduction" id="Qy8-9R-nYM" customClass="IntroductionViewController" sceneMemberID="viewController"> <view key="view" tag="5" contentMode="scaleToFill" id="Ze1-gd-6RL"> - <rect key="frame" x="0.0" y="0.0" width="320" height="480"/> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <subviews> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Swipe to change direction" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="MhE-A8-uLP"> @@ -346,6 +339,6 @@ Dedikerat till världens mest awesome pingvin på hennes 20 års-dag den 12 mars <simulatedMetricsContainer key="defaultSimulatedMetrics"> <nil key="statusBar"/> <simulatedOrientationMetrics key="orientation"/> - <simulatedScreenMetrics key="destination"/> + <simulatedScreenMetrics key="destination" type="retina4"/> </simulatedMetricsContainer> </document> diff --git a/Penguin Train/GameRender.m b/Penguin Train/GameRender.m index 5bd6ea7..659e7e1 100644 --- a/Penguin Train/GameRender.m +++ b/Penguin Train/GameRender.m @@ -142,17 +142,29 @@ - (void)showTapToStartSymbol { if(!tapSymbol) { - tapSymbol = [SKSpriteNode node]; + tapSymbol = [SKSpriteNode spriteNodeWithImageNamed:@"SwipeGestureClean"]; tapSymbol.name = @"tap-symbol"; tapSymbol.color = [UIColor blackColor]; - tapSymbol.size = CGSizeMake(32, 32); + + SKAction *growth = [SKAction repeatActionForever:[SKAction sequence:@[ + [SKAction scaleBy:1.2 duration:0.2], + [SKAction scaleTo:1 duration:0.2] + ]]]; + + [tapSymbol runAction:growth]; + + [self addChild:tapSymbol]; } Block *firstBlock = [self.currentGame.trains[0] headBlock]; - tapSymbol.position = firstBlock.point; //edit later. + CGPoint modifiedPosition = [firstBlock realPixelPoint]; + modifiedPosition.x = modifiedPosition.x + BLOCK_SIZE; + modifiedPosition.y = modifiedPosition.y + BLOCK_SIZE; + + tapSymbol.position = modifiedPosition; } @@ -160,6 +172,8 @@ - (void)countdownAndStartgame { self.paused = NO; + [self showTapToStartSymbol]; + SKLabelNode * countdown = (SKLabelNode *)[self childNodeWithName:@"countdown"]; if(!countdown) { @@ -356,8 +370,9 @@ - (void)renderEarthquakeIfDead { data = (NSNumber *)data; //[self showAd]; - //[self pauseGame]; //stops countdown. + [self pauseGame]; //stops countdown. //[self countdownAndStartgame]; + [self showTapToStartSymbol]; [[self children] enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop) { @@ -398,7 +413,7 @@ - (void)hideAd { - (void)pauseGame { - [self setPaused:YES]; + //[self setPaused:YES]; self.currentGame.paused = YES; //[self stopCountdown]; diff --git a/Penguin Train/Images.xcassets/SwipeGesture.imageset/Contents.json b/Penguin Train/Images.xcassets/SwipeGesture.imageset/Contents.json new file mode 100644 index 0000000..8ba8426 --- /dev/null +++ b/Penguin Train/Images.xcassets/SwipeGesture.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "pixelated-swipe-gesture.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "pixelated-swipe-gesture@2x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Penguin Train/Images.xcassets/SwipeGesture.imageset/pixelated-swipe-gesture.png b/Penguin Train/Images.xcassets/SwipeGesture.imageset/pixelated-swipe-gesture.png new file mode 100644 index 0000000..ee02769 Binary files /dev/null and b/Penguin Train/Images.xcassets/SwipeGesture.imageset/pixelated-swipe-gesture.png differ diff --git a/Penguin Train/Images.xcassets/SwipeGesture.imageset/pixelated-swipe-gesture@2x.png b/Penguin Train/Images.xcassets/SwipeGesture.imageset/pixelated-swipe-gesture@2x.png new file mode 100644 index 0000000..8376363 Binary files /dev/null and b/Penguin Train/Images.xcassets/SwipeGesture.imageset/pixelated-swipe-gesture@2x.png differ diff --git a/Penguin Train/Images.xcassets/SwipeGestureClean.imageset/Contents.json b/Penguin Train/Images.xcassets/SwipeGestureClean.imageset/Contents.json new file mode 100644 index 0000000..6df3491 --- /dev/null +++ b/Penguin Train/Images.xcassets/SwipeGestureClean.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "pixelated-but-awesome.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "pixelated-but-awesome@2x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Penguin Train/Images.xcassets/SwipeGestureClean.imageset/pixelated-but-awesome.png b/Penguin Train/Images.xcassets/SwipeGestureClean.imageset/pixelated-but-awesome.png new file mode 100644 index 0000000..88cdc4b Binary files /dev/null and b/Penguin Train/Images.xcassets/SwipeGestureClean.imageset/pixelated-but-awesome.png differ diff --git a/Penguin Train/Images.xcassets/SwipeGestureClean.imageset/pixelated-but-awesome@2x.png b/Penguin Train/Images.xcassets/SwipeGestureClean.imageset/pixelated-but-awesome@2x.png new file mode 100644 index 0000000..cfe76b7 Binary files /dev/null and b/Penguin Train/Images.xcassets/SwipeGestureClean.imageset/pixelated-but-awesome@2x.png differ diff --git a/Penguin Train/Images.xcassets/SwipeGestureDark.imageset/Contents.json b/Penguin Train/Images.xcassets/SwipeGestureDark.imageset/Contents.json new file mode 100644 index 0000000..a1835ed --- /dev/null +++ b/Penguin Train/Images.xcassets/SwipeGestureDark.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "swipe-gesture-dark.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "swipe-gesture-dark@2x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Penguin Train/Images.xcassets/SwipeGestureDark.imageset/swipe-gesture-dark.png b/Penguin Train/Images.xcassets/SwipeGestureDark.imageset/swipe-gesture-dark.png new file mode 100644 index 0000000..5c7e45b Binary files /dev/null and b/Penguin Train/Images.xcassets/SwipeGestureDark.imageset/swipe-gesture-dark.png differ diff --git a/Penguin Train/Images.xcassets/SwipeGestureDark.imageset/swipe-gesture-dark@2x.png b/Penguin Train/Images.xcassets/SwipeGestureDark.imageset/swipe-gesture-dark@2x.png new file mode 100644 index 0000000..e35289a Binary files /dev/null and b/Penguin Train/Images.xcassets/SwipeGestureDark.imageset/swipe-gesture-dark@2x.png differ diff --git a/Penguin Train/Models/Train.m b/Penguin Train/Models/Train.m index ef6bd4b..b7f7783 100644 --- a/Penguin Train/Models/Train.m +++ b/Penguin Train/Models/Train.m @@ -55,7 +55,7 @@ - (Train *) initWithIdentifier: (NSInteger) requestedIdentifier { - (void) calculateStartingPosition { startingPosition.x = BLOCK; //one block - startingPosition.y = self.identifier + (BLOCK); + startingPosition.y = self.identifier + (BLOCK * 4); }