■mp3音楽再生 cocos2d
http://www.fou.ne.jp/iphone/
■パーティクル
http://idlysphere.blog66.fc2.com/blog-entry-179.html
■加速度センサ
// isTouchEnabled is property of Layer (the super class). // When it is YES, then the accelerometer will be enabled self.isAccelerometerEnabled = YES;
// This callback will be called because 'isAccelerometerEnabled' is YES. - (void) accelerometer:(UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration { // Sprite *sprite = [self getChildByTag:kTagSprite]; // Convert the coordinates to 'landscape' coords // since they are always in 'portrait' coordinates CGPoint converted = ccp((float) - acceleration.y, (float)acceleration.x); // update the rotation based on the z-rotation // the sprite will always be 'standing up' mySprite.rotation = (float) CC_RADIANS_TO_DEGREES(atan2f(converted.x, converted.y) + M_PI); // update the scale based on the length of the acceleration // the higher the acceleration, the higher the scale factor mySprite.scale = 0.5f + sqrtf((converted.x * converted.x) + (converted.y * converted.y)); }