Skip to content

Instantly share code, notes, and snippets.

View darkdukey's full-sized avatar

Nite Luo darkdukey

View GitHub Profile
@darkdukey
darkdukey / PluginProtocal.h
Created July 29, 2014 18:33
AnySDK Ads API
/** @file PluginProtocol.h
*/
#ifndef __CCX_IPLUGIN_H__
#define __CCX_IPLUGIN_H__
#include "PluginParam.h"
#include <vector>
namespace anysdk { namespace framework {
@darkdukey
darkdukey / gist:2e58ebc03176046fb785
Created November 7, 2014 21:31
Cocos2d-x Plugin for PushNotification
#include "PluginProtocol.h"
#include <map>
#include <list>
#include <string>
using namespace std;
typedef enum
{
@darkdukey
darkdukey / Design.md
Last active August 29, 2015 14:10
Cocos PackageManager

Package Manager

Package Manager provides a way for developers to easily extend cocos2d-x with plugins

Core Features:

  • Modularize coocs2d-x enable developers to customize the engine for their own game
  • Developers can search, manage and install plugins
  • Update project for the developers when install, remove or update the plugin
  • Developers can share their plugin with others
@darkdukey
darkdukey / Android.mk
Created December 15, 2014 23:55
Android.mk for Vungle Plugin
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/external)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos)
LOCAL_MODULE := cocos2dcpp_shared
@darkdukey
darkdukey / HelloWorldScene.cpp
Created December 22, 2014 18:22
Example for Cocos Studio
#include "HelloWorldScene.h"
#include "cocostudio/CocoStudio.h"
#include "ui/CocosGUI.h"
USING_NS_CC;
using namespace cocostudio::timeline;
Scene* HelloWorld::createScene()
{
@darkdukey
darkdukey / vungle crash
Created January 20, 2015 23:18
vungle plugin crash stack
01-20 15:17:09.189: E/AndroidRuntime(5322): FATAL EXCEPTION: GLThread 6519
01-20 15:17:09.189: E/AndroidRuntime(5322): Process: org.cocos2dx.HelloPlugins, PID: 5322
01-20 15:17:09.189: E/AndroidRuntime(5322): java.lang.NoClassDefFoundError: com.vungle.publisher.location.GooglePlayServicesDetailedLocationProvider$a
01-20 15:17:09.189: E/AndroidRuntime(5322): at com.vungle.publisher.location.GooglePlayServicesDetailedLocationProvider.<init>(vungle:18)
01-20 15:17:09.189: E/AndroidRuntime(5322): at com.vungle.publisher.location.GooglePlayServicesDetailedLocationProvider$$InjectAdapter.get(vungle:56)
01-20 15:17:09.189: E/AndroidRuntime(5322): at com.vungle.publisher.location.GooglePlayServicesDetailedLocationProvider$$InjectAdapter.get(vungle:23)
01-20 15:17:09.189: E/AndroidRuntime(5322): at dagger.internal.Linker$SingletonBinding.get(Linker.java:364)
01-20 15:17:09.189: E/AndroidRuntime(5322): at com.vungle.publisher.inject.ConfigurablePublisherModule$$ModuleAdapter$ProvideDetailedLocationProviderProvides
@darkdukey
darkdukey / nsarray.mm
Last active August 29, 2015 14:17 — forked from jeremy-w/nsarray.mm
//clang++ -std=c++11 -stdlib=libc++ -framework Foundation nsarray.mm -o nsarray
/* Note:
* - libstdc++ has been frozen by Apple at a pre-C++11 version, so you must opt
for the newer, BSD-licensed libc++
* - Apple clang 4.0 (based on LLVM 3.1svn) does not default to C++11 yet, so
you must explicitly specify this language standard. */
/* @file nsarray.mm
* @author Jeremy W. Sherman
*
* Demonstrates three different approaches to converting a std::vector
@darkdukey
darkdukey / gist:2e65db671bf58b4168fa
Created April 29, 2015 22:23
Setup dev environment for cocos2d-x

Setup dev environment for cocos2d-x

Install homebrew

Start a console window and run following command

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install android SDK/NDK

When the homebrew installation is finished, run the following command

@darkdukey
darkdukey / sdkbox_config.json
Last active August 29, 2015 14:23
SDKBox GooglePlay IAP sample
"android" :
{
"iap":
{
"key":"your in-app-billing key here",
"items":{}
}
}
@darkdukey
darkdukey / Cocos2dxActivity.java
Created July 14, 2015 01:05
SDKBOX Cocos2dxActivity.java Sample
/****************************************************************************
Copyright (c) 2010-2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is