“羊了个羊”之“麻了个麻”源码分享学习

For循环游戏开发
训练营
羊了个羊之麻了个麻
源码分享,感恩有你!
For循环训练营

“通关率不到0.1%。”因其“血压飙升”的通关设计,一款名为《羊了个羊》的微信小游戏最近走红社交网络。据了解,《羊了个羊》由北京简游科技研发,研发引擎为 Cocos Creator。为防止完全抄袭,我营老师整整花了两个小时,参照《羊了个羊》含泪写出《麻了个麻》。
开发工具
用了什么东西开发?
|
1 |
CocosCreator2.3.1开发引擎 |
|
2 |
Vscode编辑器 |
|
3 |
NodeJS语言 |
看看怎么玩
已关注
关注
重播 分享 赞
麻了个麻,为麻将元素的三消休闲游戏。
部分源码

代码部分
onClickSheep(layerIdx, pos) {let sheepInfo = this.map[layerIdx][pos];if (sheepInfo.lockNum) {return;}if (!this.doDeal(sheepInfo.sheep)) {return;}for (let tPos of sheepInfo.lockList) {this.map[layerIdx - 1][tPos].lockNum--;if (this.map[layerIdx - 1][tPos].lockNum == 0) {this.map[layerIdx - 1][tPos].sheep.spNode.runAction(cc.tintTo(0.1, 255, 255, 255));}}// sheepInfo.sheep.destroy();delete this.map[layerIdx][pos];},// LIFE-CYCLE CALLBACKS:// onLoad () {},start() {this.isOver = false;this.sheepItem = this.layerSheep.getChildByName("sheepItem");this.sheepItem.removeFromParent();this.initLevel();this.initDeal();cc.audioEngine.playMusic(this.clips[0], true);},
源码地址
百度网盘分享
链接:https://pan.baidu.com/s/1OzLVtkPKxORGUX71QjvXRw
提取码:mlgm
细聊学习咨询
15576202001(微信同号)
技术/ For循环游戏开发训练营
游戏素材 / 千图

微信号 / leason
公众号 / For循环训练营

夜雨聆风