2014-02-09から1日間の記事一覧
CCAnimationのinitWithAnimationFramesの引数でloopが何か分からない。ループ回数? 0だとアニメーションしない? 1だと一度だけ? 無限ループは? /** how many times the animation is going to loop. 0 means animation is not animated. 1, animation is…
プロジェクトへ「Player.plist」、「Player.png」を追加した。Player.plistはこのようにキャッシュさせる CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Player.plist"); 「Player.png」自体は文字を実際に使わない。 フレームの…
フォーマットと連結と CCString* tileMapStr = CCString::createWithFormat("TileMap_%d_%d", 1, 1); tileMapStr->m_sString.append(".tmx"); intをCCStringに .tmxを最後に連結。 m_sStringを使う。 CCString* tileMapStr = CCString::createWithFormat("Ti…
他人のgithubからダウンロードしたりしていて、使っているcocos2d-xのバージョンがわからない時の確認方法。 #include "cocos2d.h" の記述されているところで、適当に右クリックして 「Jump to Definition」を選択。すると、 「cocos2d.h」ファイルが見られ…