cocos2d-x lua之table

coco2dx_xiaozheng 2017-09-04 01:07:03
使用lua来写逻辑脚本语言,做游戏麻将类型开发,其中最重要的就是table(表),创建表达 方式就是构造表达式,形式就是:{},元素与元素之间使用逗号来隔开,并且可以在表当真去嵌套多个表的形式,这是个人入手lua学的table基本创建形式
...全文
596 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
生命练习生123 2018-02-05
  • 打赏
  • 举报
回复
lua中数据结构只有表,但是在用时还是要注意,特别是循环时,for in pairs 和 ipairs区别和排空处理
coco2dx_xiaozheng 2017-12-03
  • 打赏
  • 举报
回复
是呀,各种调用
球场上的哈登 2017-11-29
  • 打赏
  • 举报
回复
lua基本上就是各种table的使用了,甚至回调也可以放到表里面。很方便
Title: Cocos2d-x by Example: Beginner’s Guide, 2nd Edition Author: Roger Engelbert Length: 250 pages Edition: 1 Language: English Publisher: Packt Publishing Publication Date: 2015-04-30 ISBN-10: 1785288857 ISBN-13: 9781785288852 Unleash your inner creativity and learn how to build great cross-platform 2D games with the popular Cocos2d-x framework About This Book Build multi-device games, letting the framework do all the heavy lifting! Spruce up your games with easy-to-apply animations, particle effects, and physics simulation Quickly implement and test your own game play ideas, with an eye for optimization and portability Who This Book Is For If you are a game enthusiast who would like to develop and publish your own game ideas onto different app stores, this is the book for you. Some knowledge of C++ or Java is helpful but not necessary. In Detail Upgraded and updated, the powerful and popular open source framework Cocos2d-x is better than ever. Through step-by-step tutorials, you'll learn how to take complete advantage of the framework. You'll learn how to add animations and special effects, implement a physics engine, optimize your games, prepare a project for multiple devices, and develop game ideas from the test version to a finished project. Most importantly, this book provides you with the accumulated knowledge of thousands of game developers, all packed into one easy-to-use and proven framework that will save time and strenuous thinking! Table of Contents Chapter 1. Installing Cocos2d-x Chapter 2. You Plus C++ Plus Cocos2d-x Chapter 3. Your First Game – Air Hockey Chapter 4. Fun with Sprites – Sky Defense Chapter 5. On the Line – Rocket Through Chapter 6. Quick and Easy Sprite – Victorian Rush Hour Chapter 7. Adding the Looks – Victorian Rush Hour Chapter 8. Getting Physical – Box2D Chapter 9. On the Level – Eskimo Chapter 10. Introducing Lua!

721

社区成员

发帖
与我相关
我的任务
社区描述
Cocos2d-x相关内容讨论专区
社区管理员
  • Cocos2d-x
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧