Skip to content

Commit

Permalink
Started on #1, added illustrations and such.
Browse files Browse the repository at this point in the history
  • Loading branch information
xeloader committed Apr 7, 2014
1 parent 4ee77c2 commit ec6258d
Show file tree
Hide file tree
Showing 14 changed files with 83 additions and 21 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
endingColumnNumber = "9223372036854775807"
startingLineNumber = "220"
endingLineNumber = "220"
landmarkName = "-adViewDidReceiveAd:"
landmarkName = "-messageReciever:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
Expand Down
21 changes: 7 additions & 14 deletions Penguin Train/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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"/>
Expand Down Expand Up @@ -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"/>
Expand All @@ -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">
Expand Down Expand Up @@ -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>
25 changes: 20 additions & 5 deletions Penguin Train/GameRender.m
Original file line number Diff line number Diff line change
Expand Up @@ -142,24 +142,38 @@ - (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;

}

- (void)countdownAndStartgame {

self.paused = NO;

[self showTapToStartSymbol];

SKLabelNode * countdown = (SKLabelNode *)[self childNodeWithName:@"countdown"];

if(!countdown) {
Expand Down Expand Up @@ -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) {

Expand Down Expand Up @@ -398,7 +413,7 @@ - (void)hideAd {

- (void)pauseGame {

[self setPaused:YES];
//[self setPaused:YES];
self.currentGame.paused = YES;
//[self stopCountdown];

Expand Down
18 changes: 18 additions & 0 deletions Penguin Train/Images.xcassets/SwipeGesture.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "pixelated-swipe-gesture.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "pixelated-but-awesome.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "swipe-gesture-dark.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Penguin Train/Models/Train.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

Expand Down

0 comments on commit ec6258d

Please sign in to comment.