Skip to content

Commit

Permalink
add UPGRADE_TO_2_2_3.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dualface committed May 12, 2014
1 parent 84d92f2 commit 67c702f
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions UPGRADE_TO_2_2_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Upgrade to quick-cocos2d-x 2.2.3

SEARCH, REPLACE:

- tonum(), checknumber()
- tobool(), checkbool()
- toint(), checkint()
- totable(), checktable()

----

SEARCH:

~~~
api.EventProtocol.extend(target)
~~~

REPLACE:

~~~
cc(target):addComponent("components.behavior.EventProtocol"):exportMethods()
~~~

----

SEARCH:

~~~
node:registerScriptHandler(function(event)
print(event)
end)
~~~

REPLACE:

~~~
node:addNodeEventListener(cc.NODE_EVENT, function(event)
print(event.name)
end)
~~~

----

SEARCH:

~~~
node:registerScriptTouchHandler(function(event, x, y, prevX, prevY)
end)
~~~

REPLACE:

~~~
node:addNodeEventListener(cc.NODE_TOUCH_EVENT, function(event)
print(event.name, event.x, event.y, event.prevX, event.prevY)
end)
~~~

----

SEARCH:

~~~
node:scheduleUpdate(function(dt)
print(dt)
end)
~~~

REPLACE:

~~~
self:addNodeEventListener(cc.NODE_ENTER_FRAME_EVENT, function(dt)
print(dt)
end)
self:scheduleUpdate()
~~~

0 comments on commit 67c702f

Please sign in to comment.