cocos2d x3 0 lua學習(乙個)

2021-09-07 01:51:29 字數 1056 閱讀 3284

最近開始學習lua這裡記錄下乙個寫簡單lua**,但我在寫lua**。自己主動的**提示的一些問題,誰希望提供下很好的解決方案,編輯我用sublime text2 

test.lua。這裡建立乙個場景,乙個層  ,乙個label  將test.lua換到helloworld 中的main.lua就好

//

// created by 杜甲 on 14-3-10.

//require "cocos2d"

require "cocos2dconstants"

require "opengl"

require "openglconstants"

require "studioconstants"

require "guiconstants"

local scene = cc.scene:create()

local layer = cc.layer:create()

local label1 = cc.label:createwithbmfont("res/fonts/bitmapfonttest2.fnt", "test")

label1:setanchorpoint( cc.p(0,0) )

layer:addchild(label1,0,1)

local fade = cc.fadeout:create(1.0)

local fade_in = fade:reverse()

local seq = cc.sequence:create(fade,fade_in)

local repeataction = cc.repeatforever:create(seq)

label1:runaction(repeataction)

scene:addchild(layer)

cc.director:getinstance():runwithscene(scene)

效果:

Cocos2d x 3 0 lua中的排程器

cocos2dx 3.x lua 中使用定時器有兩種方式 1 self scheduleupdatewithprioritylua update,priority 引數一 重新整理函式 引數二 重新整理優先順序 其中 self 為 node類 的子類。該方法預設為每幀都重新整理一次,無法自定義重新整...

cocos2dx 3 0 學習資源

目前看見的cocos2dx 3.0 學習資源 官方的英文 我也在wiki上看了一會,有的還用有道詞典查詢的單詞什麼的。史上最坑爹的遊戲 holdtail 目前資料很少,mac下開發的資源就更少了。如果有朋友看見其他資源可以告訴我啊,謝謝 cocos2dx 3.0基礎知識 cocos2dx 3.0 a...

cocos2d x 3 0 編譯問題

3.0最主要的問題是它引進了c 11 所有ndk版本必須是r8e版本以上,即使你已經有這些已經準備好,還要注意一點是ndk編譯的時候預設採用ndk toolchain version 4.6的形式去編譯,這個時候就會出現 error thread in namespace std does not ...