万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    ■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));
    }