cocos2d-x 101次相遇 / 目錄
1 安裝和環境搭建 -xcode
2 scenes , director, layers, sprites
3 建立圖檔菜單
4 在helloworld上--建立新場景
5 增加一個精靈sprite
5.1 縮小sprite并使之完整顯示
6 action ,移動sprite
7 3.0 的點選事件,cctouchdelegate已經停用了
8 使用觸摸事件移動 精靈
cocos2d-x 3.0 不再使用 touchdelegate方式來将touch事件捆綁到sprite上。
新的方法是
這段代碼可以放在.cpp裡面的 init裡。
頭檔案增加:
s 為全局的精靈。
這段代碼,點選到精靈,精靈就會移動。