axmol/README.mdown

2.6 KiB

cocos2d-x multiplatform

cocos2d-x is a multi-platform 2D game engine in C++, based on cocos2d-iphone and licensed under MIT. Now this engine has been ported to WOPhone, iOS 4.1, Android 2.1 and higher, WindowsXP & Windows7.

Multi Platform

  • cocos2d-iphone-cpp: tested on iPhone 3.2, 4.1 & 4.2 SDK
  • cocos2d-android-ndk: based on ndk-r4(crystax.net version) & ndk-r5, tested on Android 2.1, 2.2, 2.3 emulator, HTC G2, G3, G6, G7 device
  • cocos2d-wophone: well tested on WOPhone of ChinaUnicom, both emulator & device.
  • cocos2d-win32: well tested on WindowsXP & Windows7. It depends on PowerVR OpenGL ES 1.1 libraries for win32 system

Document

Contact us

Lua Support FIX Readme

  • CCScheduler support local function
  • Support autorelease C++ object
  • When C++ object deletd set Lua object userdata to nil
  • Add CCNode:setPosition(x, y), CCNode::getPosition(), huge performance boost
  • Remove needless class and functions from tolua++ .pkg files, improved performance

How to use:

local scheduler = CCScheduler:sharedScheduler()

local handle    -- save script callback handle

local frameCount = 0
local function onEnterFrame(dt)
    print("onEnterFrame:", frameCount)
    frameCount = frameCount + 1
    if frameCount >= 60 then
        -- remove script callback
        scheduler:unscheduleScriptFunc(handle)
    end
end

handle = scheduler:scheduleScriptFunc(onEnterFrame, 1.0 / 60, false)

TODO:

  • When C++ object deleted, remove Lua object userdata
  • CCMenuItem support script function