mirror of https://github.com/axmolengine/axmol.git
[android] HelloWorld supports cocosdenshion
This commit is contained in:
parent
724ac1d0a9
commit
4893de18f3
|
@ -3,6 +3,7 @@ include $(CLEAR_VARS)
|
|||
|
||||
subdirs := $(addprefix $(LOCAL_PATH)/../../../,$(addsuffix /Android.mk, \
|
||||
cocos2dx \
|
||||
CocosDenshion/android \
|
||||
))
|
||||
subdirs += $(LOCAL_PATH)/helloworld/Android.mk
|
||||
|
||||
|
|
|
@ -11,12 +11,12 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../cocos2dx \
|
|||
$(LOCAL_PATH)/../../../../cocos2dx/include \
|
||||
$(LOCAL_PATH)/../../..
|
||||
|
||||
LOCAL_LDLIBS := -L$(LOCAL_PATH)/../../libs/armeabi -lcocos2d -llog
|
||||
LOCAL_LDLIBS := -L$(LOCAL_PATH)/../../libs/armeabi -lcocos2d -llog -lcocosdenshion
|
||||
|
||||
# it is used for ndk-r5
|
||||
# because the new Windows toolchain doesn't support Cygwin's drive
|
||||
# mapping (i.e /cygdrive/c/ instead of C:/)
|
||||
# LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/armeabi) \
|
||||
# -lcocos2d -llog
|
||||
# -lcocos2d -llog -lcocosdenshion
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
|
@ -34,6 +34,7 @@ public class ApplicationDemo extends Cocos2dxActivity{
|
|||
|
||||
static {
|
||||
System.loadLibrary("cocos2d");
|
||||
System.loadLibrary("cocosdenshion");
|
||||
System.loadLibrary("helloworld");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,6 +153,9 @@ public class Cocos2dxActivity extends Activity{
|
|||
if (accelerometerEnabled) {
|
||||
accelerometer.enable();
|
||||
}
|
||||
|
||||
// resume background music
|
||||
resumeBackgroundMusic();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -161,6 +164,9 @@ public class Cocos2dxActivity extends Activity{
|
|||
if (accelerometerEnabled) {
|
||||
accelerometer.disable();
|
||||
}
|
||||
|
||||
// pause background music
|
||||
pauseBackgroundMusic();
|
||||
}
|
||||
|
||||
protected void setPackgeName(String packageName) {
|
||||
|
|
Loading…
Reference in New Issue