Drkcore

20 04 2013 iPhone Cocos2d Tweet

cocos2dでiPhoneアプリ(ゲーム)を作っている

まだ4章までしか読んでいないけど、丁寧に解説してあってわかりやすい。メモリ管理はARCなので今風なのかな。

ProductName Learn Cocos2d 2: Game Development for Ios
Steffen Itterheim
Apress / 3302円 ( 2012-09-19 )


kobold2dはcocos2dの足りないところを追加したライブラリのようだ。

kobold

4章では落ちてくる蜘蛛をよけるゲームをつくる。音の扱い方もこの章で学ぶ。

cocos2d

deprecatedになっていたメソッドがいくつかあった。

//self.isAccelerometerEnabled = YES;
[self setAccelerometerEnabled:YES];

ブロックオブジェクトの使い方もちょっと分かったような。

CCCallBlock* callDidDrop = [CCCallBlock actionWithBlock:^void(){
    // move the droppedSpider back up outside the top of the screen
    CGPoint pos = spider.position;
    pos.y = screenSize.height + spider.texture.contentSize.height;
    spider.position = pos;
}];

CCSequence* sequence = [CCSequence actions:easeHang, easeEnd, callDidDrop, nil];

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021