码迷,mamicode.com
首页 > 其他好文 > 详细

cocos

时间:2019-02-14 15:00:15      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:update   tor   节点   设置   zab   scripting   序列   call   ndis   

生命周期回调
onLoad
start
update
lateUpdate
onDestroy
onEnable
onDisable

 

 

 

 


http://docs.cocos.com/creator/manual/zh/scripting/reference/class.html#type-%E5%8F%82%E6%95%B0
属性常用参数:
default:设置属性的默认值,这个默认值仅在组件第一次添加到节点上时才会用到
type:限定属性的数据类型,详见 CCClass 进阶参考:type 参数

Label、AudioClip、Prefab、Node、Vec2、spritrFrame(精灵帧)
Integer、Boolean、String、Float、

visible:设为 false 则不在属性检查器面板中显示该属性
serializable: 设为 false 则不序列化(保存)该属性
displayName:在属性检查器面板中显示成指定名字
tooltip:在属性检查器面板中添加属性的 tooltip

 


网站资源
cocos
os

http://docs.cocos.com/creator/manual/zh/getting-started/quick-start.html
api
http://docs.cocos.com/creator/api/zh/
// Learn cc.Class:
// - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/class.html
// Learn Attribute:
// - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html

 

cocos

标签:update   tor   节点   设置   zab   scripting   序列   call   ndis   

原文地址:https://www.cnblogs.com/lgyong/p/9634764.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!