
cocos creator
dabao87
php
展开
-
cocos creator 倒计时
properties: { time: cc.Label }, start() { this.schedule(this.doCountdownTime, 1); }, //倒计时 doCountdownTime() { //每秒更新显示信息 if (this.time.string > 0) { this.time.string -= 1; ...原创 2020-05-14 14:50:59 · 866 阅读 · 0 评论 -
cocos creator制作弹窗有小到大的动画显示
参考:https://www.bilibili.com/video/BV1kJ411u72v?p=21.选择要生成动画的弹窗 》添加组件 》其他组件 》Animation结果就是这样的这里看到需要 animation-clip 文件,下面制作animation-clip文件2.在 assets 中新建文件夹 animClip , 专门用来存放 animation-cli...原创 2020-04-30 15:33:17 · 1893 阅读 · 0 评论 -
cocos creator弹窗里面的内容可以上下滚动
一定要按照这个方式来布局背景就是显示内容的地方,遮罩一定别忘记了,这个是很重要的,就是指显示你要显示的区域,其他的区域不显示,滚动的区域就是你要显示的内容给ruleLabelBg添加ScrollView属性给遮罩添加遮罩属性content的区域大小设置和遮罩一样的大小代码部分: properties: { scrollView: {...原创 2020-04-30 11:26:20 · 1173 阅读 · 0 评论 -
cocos creator demo
获取prefab和获取脚本settingsPrefab: { default: null, type: cc.Prefab},this.settingsPrefab = cc.instantiate(this.settingsPrefab);this.settingsPrefab.parent = this.node;this.settingsPrefabScri...原创 2020-04-15 13:41:53 · 764 阅读 · 0 评论 -
更改creator预制体的属性
这里以背景音乐为例:预制体music脚本cc.Class({ extends: cc.Component, properties: { bgAudio: { default: null, type: cc.AudioClip } }, // LIFE-CYCLE CALLB...原创 2020-04-10 15:01:24 · 1364 阅读 · 1 评论 -
creator制作进度条
登录界面的主场景进度条的prefab登录的JS文件cc.Class({ extends: cc.Component, properties: { backGround: cc.Node, //背景图的节点 progressBarPrefab: cc.Prefab //进度条的prefab }, // L...原创 2020-04-02 15:23:33 · 730 阅读 · 0 评论 -
creator动画角度
cc.Class({ extends: cc.Component, properties: { monster:cc.Node, }, // LIFE-CYCLE CALLBACKS: onLoad () { //使用事件名来注册 this.node.on('touchstart',functio...原创 2020-03-20 14:54:50 · 219 阅读 · 0 评论