Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
quick-cocos2d-x 培训 01
Search
YuLei Liao
February 28, 2013
Programming
300
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
quick-cocos2d-x 培训 01
YuLei Liao
February 28, 2013
Other Decks in Programming
See All in Programming
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
ActionController meets Protocol Buffers
sorah
0
530
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
Next.js: The final boss of Web Performance
guaca
0
260
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
690
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
220
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Fireside Chat
paigeccino
43
4.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Technical Leadership for Architectural Decision Making
baasie
3
600
Ethics towards AI in product and experience design
skipperchong
2
430
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
We Have a Design System, Now What?
morganepeng
55
8.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
From π to Pie charts
rasagy
1
400
Transcript
quick-cocos2d-x 架构
quick-cocos2d-x 架构
搭建开发环境 • http://dualface.github.com/blog/2013/02/28/ from-flash-to-quick/
cocos2d-x基本概念 • 坐标系:左下⾓角为屏幕原点、图像的锚点默认 在中央 • “节点树”结构 • CCNode/CCScene/CCLayer/CCSprite • Action:
MoveTo, MoveBy, RotationTo, ScaleTo.. • 事件:touch(began, moved, ended, cancelled), enterFrame
Lua 的核⼼心⽤用法 • 函数是值(与AS3、JS等⼀一样) • 表格是唯⼀一的数据容器(赋值时只拷⻉贝引⽤用) • 数组、字典 • clone()
函数 • ⽤用表格模拟对象 • self, “:”和“.”的区别 • class() 函数
quick framework • 很薄的⼀一层封装,简化最常⻅见的操作 • display 模块 • transition 模块
• display 模块如何扩展 cocos2d-x 的 C++ 对象
Component-based Architecture • 对象仅仅是“容器”:ObjectBase • 以“⾏行为”扩展对象:object:bindMethod() 为对象绑定⼀一个⽅方法 • 创建⾏行为,绑定⾏行为到对象 •
不同“⾏行为”的组合就可以满⾜足任意需求
Component-based Architecture • ⾏行为间的依赖和优先级 • ⽅方法链:不同⾏行为可以为对象绑定同名 ⽅方法;在⽅方法中可以调⽤用同名⽅方法的“⽗父 类”实现 • 不影响性能