上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 43 下一页
摘要: 新建一个节点,添加audio source,然后再audio source上面添加代码,再把当前节点拖到cc.AudioSource组件上面。 阅读全文
posted @ 2016-04-29 15:25 yufenghou 阅读(107) 评论(0) 推荐(0)
摘要: MonsterPrefab.js Populate.js 阅读全文
posted @ 2016-04-29 13:48 yufenghou 阅读(639) 评论(0) 推荐(0)
摘要: x=x+v v=v+gr cc.Class({ extends: cc.Component, properties: { velocity:{ default:null }, grivatity:{ default:null }, }, // use this for initialization 阅读全文
posted @ 2016-04-29 13:18 yufenghou 阅读(132) 评论(0) 推荐(0)
摘要: ``` cc.Class({ extends: cc.Component, properties: { elementLable: { default: null, type : cc.Label }, map: { default:null, ... 阅读全文
posted @ 2016-04-27 17:56 yufenghou 阅读(268) 评论(0) 推荐(0)
摘要: ``` //移动方向枚举类 var MoveDirection = cc.Enum({ NONE: 0, UP: 1, DOWN: 2, LEFT: 3, RIGHT: 4 }); var minTilesCount = 2; var mapMoveStep = 1; var minMoveValue = 50; cc.Class({ exte... 阅读全文
posted @ 2016-04-27 13:24 yufenghou 阅读(251) 评论(0) 推荐(0)
摘要: ``` cc.Class({ extends: cc.Component, properties: { player:{ default:null, type:cc.Sprite } }, // use this for initialization onLoad: func... 阅读全文
posted @ 2016-04-25 17:00 yufenghou 阅读(231) 评论(0) 推荐(0)
摘要: ``` cc.Class({ extends: cc.Component, properties: { anim:cc.Animation, }, // use this for initialization onLoad: function () { }, sheepJump:function() {... 阅读全文
posted @ 2016-04-20 13:33 yufenghou 阅读(151) 评论(0) 推荐(0)
摘要: setInterval可以用来设置函数的执行频率 active 可以用来设置是否启用 cc.Class({ extends: cc.Component, properties: { nodeList: { default: [], type: [cc.Node] } }, // use this f 阅读全文
posted @ 2016-04-19 19:55 yufenghou 阅读(112) 评论(0) 推荐(0)
摘要: ``` cc.Class({ extends: cc.Component, properties: { sheepAnim: { default: null, type: cc.Animation } }, // use this for initialization on... 阅读全文
posted @ 2016-04-18 23:47 yufenghou 阅读(106) 评论(0) 推荐(0)
摘要: ``` cc.Class({ extends: cc.Component, properties: { }, // use this for initialization onLoad: function () { //console.log("dongshe") var self=this ... 阅读全文
posted @ 2016-04-18 23:34 yufenghou 阅读(154) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 43 下一页