bool RogueScene::init() {
... 省略 ...
auto foreground_player_listener = EventListenerCustom::create(EVENT_COME_TO_FOREGROUND_ROGUE, [actorSprite](EventCustom* event){
CCLOG("event! EVENT_COME_TO_FOREGROUND_ROGUE actorSprite");
// 左向け左!
actorSprite->runLeftAction();
});
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
// This function will be called when the app is inactive. When comes a phone call,it's be invoked too | |
void AppDelegate::applicationWillEnterForeground() { | |
Director::getInstance()->stopAnimation(); | |
// if you use SimpleAudioEngine, it must be pause | |
// SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic(); | |
// フォアグラウンド時のイベントを発行 | |
cocos2d::EventCustom foreground_event_rgoue(EVENT_COME_TO_FOREGROUND_ROGUE); | |
Director::getInstance()->getEventDispatcher()->dispatchEvent(&foreground_event_rgoue); |
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
// this function will be called when the app is active again | |
void AppDelegate::applicationWillEnterForeground() { | |
Director::getInstance()->startAnimation(); | |
// if you use SimpleAudioEngine, it must resume here | |
// SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic(); | |
CCLOG("バックグラウンドから復活しました!!"); | |
auto base_scene = Director::getInstance()->getRunningScene(); |
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
bool RogueScene::init() { | |
//... 省略 ... | |
auto foreground_player_listener = EventListenerCustom::create(EVENT_COME_TO_FOREGROUND_ROGUE, [actorSprite](EventCustom* event){ | |
CCLOG("event! EVENT_COME_TO_FOREGROUND_ROGUE actorSprite"); | |
// 左向け左! | |
actorSprite->runLeftAction(); | |
}); | |
this->getEventDispatcher()->addEventListenerWithSceneGraphPriority(foreground_player_listener, actorSprite); |
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
web: target/universal/stage/bin/playapp -Dhttp.port=$PORT -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=$DATABASE_URL |
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
// add "HelloWorld" splash screen" | |
auto sprite = Sprite::create("HelloWorld.png"); | |
sprite->setRotation3D(cocos2d::Vertex3F(-80.0, 0.0, 0.0)); | |
// positionZのMoveToとかないのか。。。 | |
sprite->runAction(RepeatForever::create(Sequence::create(DelayTime::create(0.2f), CallFunc::create([sprite]() { | |
sprite->setPositionZ(sprite->getPositionZ()-10); | |
}), NULL))); | |
auto miniSprite = Sprite::create("HelloWorld.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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.10.+' | |
} | |
} | |
subprojects { |
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
# proj.android/jni/Android.mk | |
LOCAL_PATH := $(call my-dir) | |
COCOS2DX_ROOT := $(LOCAL_PATH)/../../cocos2d | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := cocos2dcpp_shared | |
LOCAL_MODULE_FILENAME := libcocos2dcpp |
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
apply plugin: 'android-library' | |
android { | |
compileSdkVersion 19 | |
buildToolsVersion "19.0.3" | |
defaultConfig { | |
minSdkVersion 9 | |
targetSdkVersion 19 | |
} |
OlderNewer