diff --git a/.DS_Store b/.DS_Store
index 41f4342..2a40842 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/GameScreen.m b/GameScreen.m
index dc2f7d3..190bc52 100644
--- a/GameScreen.m
+++ b/GameScreen.m
@@ -47,30 +47,30 @@ - (void)viewDidLoad
[self.view addSubview:top];
[self.view addSubview:bottom];
- myTimer = [NSTimer scheduledTimerWithTimeInterval:.3 target: self
+ myTimer = [NSTimer scheduledTimerWithTimeInterval:.01 target: self
selector: @selector(dropTheBird:) userInfo: nil repeats: YES];
[myTimer fire];
// Do any additional setup after loading the view from its nib.
}
-(void)dropTheBird:(id)sender{
- [flipperBird setFrame:CGRectMake(flipperBird.frame.origin.x, flipperBird.frame.origin.y+30, flipperBird.frame.size.width, flipperBird.frame.size.height)];
- [top setFrame:CGRectMake(top.frame.origin.x - 10, top.frame.origin.y, top.frame.size.width, top.frame.size.height)];
- [bottom setFrame:CGRectMake(bottom.frame.origin.x - 10, bottom.frame.origin.y, bottom.frame.size.width, bottom.frame.size.height)];
- if (flipperBird.frame.origin.y > 526) {
+ [flipperBird setFrame:CGRectMake(flipperBird.frame.origin.x, flipperBird.frame.origin.y+1, flipperBird.frame.size.width, flipperBird.frame.size.height)];
+ [top setFrame:CGRectMake(top.frame.origin.x - 2, top.frame.origin.y, top.frame.size.width, top.frame.size.height)];
+ [bottom setFrame:CGRectMake(bottom.frame.origin.x - 2, bottom.frame.origin.y, bottom.frame.size.width, bottom.frame.size.height)];
+ if (flipperBird.frame.origin.y > 503) {
UIAlertView *GameOVer = [[UIAlertView alloc]initWithTitle:@"oh no!" message:@"you lost" delegate:self cancelButtonTitle:@"retry" otherButtonTitles:nil, nil];
[GameOVer show];
[myTimer invalidate];
}
if (flipperBird.frame.origin.x >= bottom.frame.origin.x && flipperBird.frame.origin.x <=bottom.frame.origin.x+40) {
- if (flipperBird.frame.origin.y <= top.frame.size.height || flipperBird.frame.origin.y >= bottom.frame.origin.y) {
- UIAlertView *GameOVer = [[UIAlertView alloc]initWithTitle:@"oh no!" message:[NSString stringWithFormat:@"you lost. Your score was %@",score.text] delegate:self cancelButtonTitle:@"okay" otherButtonTitles:nil, nil];
- [GameOVer show];
- [myTimer invalidate];
- }
+ if (flipperBird.frame.origin.y <= top.frame.size.height || flipperBird.frame.origin.y >= bottom.frame.origin.y) {
+ UIAlertView *GameOVer = [[UIAlertView alloc]initWithTitle:@"oh no!" message:[NSString stringWithFormat:@"you lost. Your score was %@",score.text] delegate:self cancelButtonTitle:@"okay" otherButtonTitles:nil, nil];
+ [GameOVer show];
+ [myTimer invalidate];
+ }
}
- if (bottom.frame.origin.x < -39) {
+ if (bottom.frame.origin.x < -120) {
[self addtoScore];
[top setFrame:CGRectMake(320, top.frame.origin.y, top.frame.size.width, top.frame.size.height)];
@@ -107,10 +107,10 @@ -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
}
-(void)makeFallwithView:(UIImageView*)bird{
- [bird setFrame:CGRectMake(bird.frame.origin.x, bird.frame.origin.y-30, bird.frame.size.width, bird.frame.size.height)];
+ [bird setFrame:CGRectMake(bird.frame.origin.x, bird.frame.origin.y-55, bird.frame.size.width, bird.frame.size.height)];
if (bird.frame.origin.y < 0) {
- UIAlertView *GameOVer = [[UIAlertView alloc]initWithTitle:@"oh no!" message:[NSString stringWithFormat:@"you lost. Your score was %@",score.text] delegate:self cancelButtonTitle:@"okay" otherButtonTitles:nil, nil];
+ UIAlertView *GameOVer = [[UIAlertView alloc]initWithTitle:@"oh no!" message:[NSString stringWithFormat:@"you lost. Your score was %@",score.text] delegate:self cancelButtonTitle:@"okay" otherButtonTitles:nil, nil];
[GameOVer show];
[myTimer invalidate];
diff --git a/GameScreen.xib b/GameScreen.xib
index dd5344c..19891d1 100644
--- a/GameScreen.xib
+++ b/GameScreen.xib
@@ -1,7 +1,7 @@
-
+
-
+
@@ -27,4 +27,4 @@
-
+
\ No newline at end of file
diff --git a/flutterBird.xcodeproj/.gitignore b/flutterBird.xcodeproj/.gitignore
new file mode 100644
index 0000000..bd9f093
--- /dev/null
+++ b/flutterBird.xcodeproj/.gitignore
@@ -0,0 +1,24 @@
+# OS X
+.DS_Store
+
+# Xcode
+build/
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+xcuserdata
+*.xccheckout
+profile
+*.moved-aside
+DerivedData
+*.hmap
+*.ipa
+
+# CocoaPods
+Pods
+
diff --git a/flutterBird.xcodeproj/project.xcworkspace/xcshareddata/flutterBird.xccheckout b/flutterBird.xcodeproj/project.xcworkspace/xcshareddata/flutterBird.xccheckout
new file mode 100644
index 0000000..5f85033
--- /dev/null
+++ b/flutterBird.xcodeproj/project.xcworkspace/xcshareddata/flutterBird.xccheckout
@@ -0,0 +1,41 @@
+
+
+
+
+ IDESourceControlProjectFavoriteDictionaryKey
+
+ IDESourceControlProjectIdentifier
+ 044DA933-1E39-4DC3-8A52-86AE108EB4C6
+ IDESourceControlProjectName
+ flutterBird
+ IDESourceControlProjectOriginsDictionary
+
+ E65F11B9-CB43-4EB1-82B6-EED10E4428E8
+ https://github.com/rsmoz/flappybirdclone.git
+
+ IDESourceControlProjectPath
+ flutterBird.xcodeproj/project.xcworkspace
+ IDESourceControlProjectRelativeInstallPathDictionary
+
+ E65F11B9-CB43-4EB1-82B6-EED10E4428E8
+ ../..
+
+ IDESourceControlProjectURL
+ https://github.com/rsmoz/flappybirdclone.git
+ IDESourceControlProjectVersion
+ 110
+ IDESourceControlProjectWCCIdentifier
+ E65F11B9-CB43-4EB1-82B6-EED10E4428E8
+ IDESourceControlProjectWCConfigurations
+
+
+ IDESourceControlRepositoryExtensionIdentifierKey
+ public.vcs.git
+ IDESourceControlWCCIdentifierKey
+ E65F11B9-CB43-4EB1-82B6-EED10E4428E8
+ IDESourceControlWCCName
+ flappybirdclone
+
+
+
+
diff --git a/flutterBird.xcodeproj/project.xcworkspace/xcuserdata/rmozayeni.xcuserdatad/UserInterfaceState.xcuserstate b/flutterBird.xcodeproj/project.xcworkspace/xcuserdata/rmozayeni.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..0451688
Binary files /dev/null and b/flutterBird.xcodeproj/project.xcworkspace/xcuserdata/rmozayeni.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/flutterBird.xcodeproj/xcuserdata/rmozayeni.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/flutterBird.xcodeproj/xcuserdata/rmozayeni.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
new file mode 100644
index 0000000..fe2b454
--- /dev/null
+++ b/flutterBird.xcodeproj/xcuserdata/rmozayeni.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -0,0 +1,5 @@
+
+
+
diff --git a/flutterBird.xcodeproj/xcuserdata/rmozayeni.xcuserdatad/xcschemes/flutterBird.xcscheme b/flutterBird.xcodeproj/xcuserdata/rmozayeni.xcuserdatad/xcschemes/flutterBird.xcscheme
new file mode 100644
index 0000000..e306682
--- /dev/null
+++ b/flutterBird.xcodeproj/xcuserdata/rmozayeni.xcuserdatad/xcschemes/flutterBird.xcscheme
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutterBird.xcodeproj/xcuserdata/rmozayeni.xcuserdatad/xcschemes/xcschememanagement.plist b/flutterBird.xcodeproj/xcuserdata/rmozayeni.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..0fb978c
--- /dev/null
+++ b/flutterBird.xcodeproj/xcuserdata/rmozayeni.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,27 @@
+
+
+
+
+ SchemeUserState
+
+ flutterBird.xcscheme
+
+ orderHint
+ 0
+
+
+ SuppressBuildableAutocreation
+
+ 5E1734DB18A8A14000D8C31A
+
+ primary
+
+
+ 5E1734FC18A8A14000D8C31A
+
+ primary
+
+
+
+
+