This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//[cocos2d-x] | |
//文字列をデリミタで分解しリスト化する関数 | |
//str 対象文字列 | |
//delim デリミタ | |
//Return 分解後リスト | |
std::list<std::string> split(std::string str, std::string delim) { | |
std::list<std::string> result; | |
long cutAt; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//[cocos2d-x] | |
//ローカライズ文字の取得関数 | |
//searchKey 対象キー | |
//comment コメント(覚書などに利用) | |
//Return ローカライズ文字列 | |
std::string LocalizedString(const char* searchKey, const char* comment){ | |
std::string ret = comment; | |
static map<std::string, std::string> localizable; | |
if(localizable.empty()){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// スクリーンショットを取得し、ツイートする | |
void screenShot() { | |
// スクリーンショットのテクスチャを取得する | |
Size size = Director::getInstance()->getWinSize(); | |
RenderTexture* texture = RenderTexture::create((int)size.width, (int)size.height); | |
texture->setPosition(Point(size.width/2, size.height/2)); | |
texture->begin(); | |
Director::getInstance()->getRunningScene()->visit(); | |
texture->end(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity android:name="org.cocos2dx.cpp.AppActivity" | |
android:label="@string/app_name" | |
android:screenOrientation="portrait" //★この部分★ | |
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" | |
android:configChanges="orientation"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 固定された物体(壁などに利用) | |
auto map = this->addNewBoxAtPosition(this, Point(0, 100), false, "map.png"); | |
// 物理計算されてダイナミックに動く物体(プレイヤーなどに利用) | |
auto player = this->addNewBoxAtPosition(this, Point(100, 100), true, "player.png"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSExceptionDomains</key> | |
<dict> | |
<key>tadamatu0001.web.fc2.com</key> | |
<dict> | |
<key>NSIncludesSubdomains</key> | |
<true/> | |
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> | |
<true/> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer