This file contains 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()){ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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
//画面解像度対応 | |
// 480x320ベースで実装を行う(iPhone 4inchのみ568x320) | |
// 画像は以下のそれぞれのフォルダより取得 | |
// @2x Resources/Published-iOS/resources-iphonehd | |
// 通常 Resources/Published-iOS/resources-iphone | |
//※AppDelegate::applicationDidFinishLaunching{} に実装する | |
// this->changeDisplayHd(); | |
void AppDelegate::changeDisplayHd() { | |
CCDirector *pDirector = CCDirector::sharedDirector(); | |
CCSize screenSize = CCEGLView::sharedOpenGLView()->getFrameSize(); |
This file contains 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 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 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/> |
This file contains 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
package com.example.myproject; | |
import com.google.appengine.api.blobstore.BlobKey; | |
import com.google.appengine.api.datastore.DatastoreService; | |
import com.google.appengine.api.datastore.DatastoreServiceFactory; | |
import com.google.appengine.api.datastore.Entity; | |
import com.google.appengine.api.datastore.EntityNotFoundException; | |
import com.google.appengine.api.datastore.Key; | |
import com.google.appengine.api.datastore.KeyFactory; |
This file contains 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
/* ======================================== | |
ScreenStateLibrary.h | |
======================================== */ | |
#import <Foundation/Foundation.h> | |
@interface ScreenStateLibrary : NSObject | |
//4インチスクリーン判定 | |
//YES=4inch、NO=4inch以外(3.5inch or iPad) | |
+(BOOL)is4inch; |
NewerOlder