文件名称:Cocos-Creator开发(来自于网络).pdf
文件大小:1.44MB
文件格式:PDF
更新时间:2023-05-08 12:13:24
coocos creator js
Cocos-Creator开发(来自于网络).pdf 目录 目录.....................................................................................................................................................2 第一章 JavaScript 快速入门...........................................................................................................8 1.1 变量.......................................................................................................................................8 1.2 函数......................................................................................................................................8 1.3 返回值..................................................................................................................................9 1.4 if/else 语句...........................................................................................................................9 1.5 JavaScript 数组(Array)...............................................................................................10 1.6 JavaScript 对象(Object).............................................................................................10 1.7 匿名函数............................................................................................................................12 1.8 链式语法............................................................................................................................13 1.9 This......................................................................................................................................14 1.10 运算符 ..............................................................................................................................14 1.11 总结...................................................................................................................................15 第二章 创建和使用组件脚本 ........................................................................................................18 2.1 创建组件脚本....................................................................................................................18 2.2 编辑脚本...........................................................................................................................19 2.3 添加脚本到场景节点中...................................................................................................19 第三章 使用 cc.Class 声明类型...................................................................................................21 3.1 定义 CCClass....................................................................................................................21 3.2 实例化................................................................................................................................21 3.3 判断类型...........................................................................................................................21 2 3.4 构造函数...........................................................................................................................21 3.5 实例方法...........................................................................................................................22 3.6 继承 ...................................................................................................................................22 3.7 声明属性 ...........................................................................................................................23 第四章 CCClass 进阶参考 ............................................................................................................29 术语...........................................................................................................................................29 4.1 原型对象参数说明............................................................................................................29 4.2 判断类型...........................................................................................................................31 4.3 成员...................................................................................................................................32 4.4 继承...................................................................................................................................35 4.5 属性...................................................................................................................................38 4.6 属性参数...........................................................................................................................39 4.7 GetSet 方法......................................................................................................................49 4.8 editor 参数 .......................................................................................................................52 第五章 访问节点和组件.................................................................................................................55 5.1 获得组件所在的节点........................................................................................................55 5.2 获得其它组件......