
cocoCreator_JS
Fanstasic
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
cocosCreator跨类调用
//游戏管理器var TGameManager = cc.Class({ extends: cc.Component, properties: { }, //单例 statics:{ self:null, getInstance:function() { if (TGameMa...原创 2019-04-03 20:42:51 · 2920 阅读 · 2 评论 -
cocos creator Touch事件
cc.Class({ extends: cc.Component, properties: { }, start () { //注册Touch事件 this.node.on(cc.Node.EventType.TOUCH_START,this.touchBegin,this); }, //实现物体...原创 2019-03-30 12:04:24 · 3209 阅读 · 0 评论 -
cocosCreator 发射事件
cc.Class({ extends: cc.Component, properties: { }, start () { this.button = this.node.getComponent(cc.Button); // this.node.on('click',this.clickButton,this); ...原创 2019-03-30 12:15:20 · 757 阅读 · 0 评论 -
cocosCreator 图片和图集的加载
cc.Class({ extends: cc.Component, properties: { }, onLoad () { }, start () { //加载图片 var spriteNode = cc.find('sprite'); var loadReCallBack = functi...原创 2019-03-30 12:18:33 · 11274 阅读 · 0 评论 -
cocosCreator跳跃实现
//人物跳跃的实现cc.Class({ extends: cc.Component, properties: { jumpDuration:0, jumpHeight:0, }, onLoad () { var isJump = false; //注册按键时间 cc.sys...原创 2019-04-01 12:29:01 · 5508 阅读 · 0 评论 -
cocos Creator ToggleContainer
在层级管理器中添加Layout节点,讲Toggle放在Layout下往Layout节点中添加ToggleContainer组件,即可实现 RadioButton的单选效果。参考文章:https://www.jianshu.com/p/7353ea1d1b83...原创 2019-04-08 14:43:37 · 3118 阅读 · 0 评论 -
cocos Creator键盘按键事件实现人物移动
cc.Class({ extends: cc.Component, properties: { speed:0 }, onLoad () { this.left = false; this.right = false; this.up = false; this.down = f...原创 2019-04-03 10:15:38 · 8348 阅读 · 1 评论