Skip to content

Commit

Permalink
Fixed! 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Jin committed Jun 13, 2016
1 parent 156cde5 commit 26960b4
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 22 deletions.
7 changes: 4 additions & 3 deletions Death_Dodger/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="leftButton" destination="vXZ-lx-hvc" eventType="touchUpInside" id="axP-5G-RyN"/>
<action selector="leftButton:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="FIX-bg-sRu"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HLe-wH-SVA">
Expand All @@ -31,11 +31,11 @@
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="rightButton" destination="vXZ-lx-hvc" eventType="touchUpInside" id="Qvc-Qo-SQc"/>
<action selector="rightButton:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="ozB-Yl-4ME"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Direction" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qL8-mG-ca3">
<rect key="frame" x="153" y="229" width="69" height="21"/>
<rect key="frame" x="153" y="163" width="69" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
Expand All @@ -51,6 +51,7 @@
<connections>
<outlet property="directionStatus" destination="qL8-mG-ca3" id="N21-9N-1Xe"/>
<outlet property="finnCharc" destination="TgQ-Lg-kJ1" id="QXz-Vg-KKf"/>
<outletCollection property="DirectionY" destination="qL8-mG-ca3" id="z26-oY-gjp"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
Expand Down
14 changes: 7 additions & 7 deletions Death_Dodger/ViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
@interface ViewController : UIViewController {

IBOutlet UILabel *directionStatus;
IBOutlet UILabel *xCoordStatus;
IBOutlet UIImageView *finnCharc;
CGFloat finnCoordX;
CGFloat finnCoordY;
char Direct;

This comment has been minimized.

Copy link
@EtherTyper

EtherTyper Jun 13, 2016

Member

Not used?

bool debug;

}

- (IBAction)rightButton;
- (IBAction)leftButton;
- (void)reDraw;

@end



- (IBAction)leftButton:(id)sender;
- (IBAction)rightButton:(id)sender;

@end
51 changes: 39 additions & 12 deletions Death_Dodger/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
// Created by Joseph Jin on 5/22/16.
// Copyright (c) 2016 Animator Joe. All rights reserved.
//
//
// ================================================================================
//
// Update Notice: Enabling the directionStatus text may cause glitches in the game.
//
// ================================================================================

#import "ViewController.h"

Expand All @@ -18,36 +24,57 @@ - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
//This part is what happens to Finn as soon as the app is loaded.

/*
spriteFinn.
*/
//spriteFinn.

// Set to True to Debug
// |
// \|/
debug = false;

directionStatus.hidden = true;
finnCoordX = finnCharc.center.x;
finnCoordY = finnCharc.center.y;


}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

- (IBAction)rightButton {
- (IBAction)leftButton:(id)sender {

directionStatus.text = @"right";
finnCoordX+=6;
if (debug){

directionStatus.text = @"left";

}

finnCharc.center = CGPointMake(finnCoordX, finnCoordY);
finnCoordX -= 10;
[self reDraw];

}

- (IBAction)leftButton {
- (IBAction)rightButton:(id)sender {

directionStatus.text = @"left";
finnCoordX-=6;
if (debug){

directionStatus.text = @"right";

}

finnCharc.center = CGPointMake(finnCoordX, finnCoordY);
finnCoordX += 10;
[self reDraw];

}

- (void)reDraw {
finnCharc.center=CGPointMake(finnCoordX,finnCoordY);
- (void)reDraw{

finnCharc.center = CGPointMake(finnCoordX, finnCoordY);

}

@end

0 comments on commit 26960b4

Please sign in to comment.