diff options
| author | Starla Insigna <starla4444@gmail.com> | 2011-10-17 20:57:46 -0400 |
|---|---|---|
| committer | Starla Insigna <starla4444@gmail.com> | 2011-10-17 20:57:46 -0400 |
| commit | 08cb72a92328cb0f38947fe5e8c5f23bab8cd0cc (patch) | |
| tree | 7f08db53abebda90785398911a6ed2f08c972051 /Classes/JumpGameMode.m | |
| parent | 4d09a715397de91a66f3fbea0fe2b629f64b6e9a (diff) | |
| download | cartcollect-08cb72a92328cb0f38947fe5e8c5f23bab8cd0cc.tar.gz cartcollect-08cb72a92328cb0f38947fe5e8c5f23bab8cd0cc.tar.bz2 cartcollect-08cb72a92328cb0f38947fe5e8c5f23bab8cd0cc.zip | |
Added support for gyroscope-based movement v0.4.8
Closes #230
Diffstat (limited to 'Classes/JumpGameMode.m')
| -rw-r--r-- | Classes/JumpGameMode.m | 14 |
1 files changed, 7 insertions, 7 deletions
| diff --git a/Classes/JumpGameMode.m b/Classes/JumpGameMode.m index b192058..eb552a2 100644 --- a/Classes/JumpGameMode.m +++ b/Classes/JumpGameMode.m | |||
| @@ -288,13 +288,6 @@ | |||
| 288 | isGesturing = NO; | 288 | isGesturing = NO; |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration | ||
| 292 | { | ||
| 293 | [super accelerometer:accelerometer didAccelerate:acceleration]; | ||
| 294 | |||
| 295 | expectedAngle = acceleration.y*M_PI_2; | ||
| 296 | } | ||
| 297 | |||
| 298 | - (int)cartShouldFall:(Cart *)m_cart | 291 | - (int)cartShouldFall:(Cart *)m_cart |
| 299 | { | 292 | { |
| 300 | int bottom = 0-m_cart.sprite.boundingBox.size.height/2; | 293 | int bottom = 0-m_cart.sprite.boundingBox.size.height/2; |
| @@ -500,6 +493,13 @@ | |||
| 500 | } | 493 | } |
| 501 | } | 494 | } |
| 502 | 495 | ||
| 496 | - (void)setPitch:(double)m_pitch | ||
| 497 | { | ||
| 498 | [super setPitch:m_pitch]; | ||
| 499 | |||
| 500 | expectedAngle = pitch*M_PI_2; | ||
| 501 | } | ||
| 502 | |||
| 503 | @end | 503 | @end |
| 504 | 504 | ||
| 505 | @implementation LedgeFactory | 505 | @implementation LedgeFactory |
