CocosCreator实现左右跳游戏JumpLR.zip

上传者: ccnu027cs | 上传时间: 2020-01-03 11:17:56 | 文件大小: 807KB | 文件类型: zip
CocosCreator实现左右跳游戏JumpLR.zip

const {ccclass, property} = cc._decorator;

@ccclass
export default class Box extends cc.Component {
@property(cc.Label)
txtNum: cc.Label = null;

private mPrevBox: cc.Node = null;
private mNextBox: cc.Node = null;
private mOffset: number = 0; // [-4,4]

// LIFE-CYCLE CALLBACKS:

// onLoad () {}

start () {

}

// update (dt) {}

setOffset(offset: number){
this.mOffset = offset;
}

getOffset(){
return this.mOffset;
}

setPrev(prev: cc.Node){
this.mPrevBox = prev;
}

getPrev(){
return this.mPrevBox;
}

setNext(next: cc.Node){
this.mNextBox = next;
}

getNext(){
return this.mNextBox;
}

setNum(num: number){
this.txtNum.string = `${num}`;
}

down(y: number){
this.node.runAction(cc.sequence(
cc.moveBy(0.4, 0, y),
cc.callFunc( () => {
NodeMgr.putBox(this.node);
})
));
}
}

文件下载

资源详情

[{"title":"( 69 个子文件 807KB ) CocosCreator实现左右跳游戏JumpLR.zip","children":[{"title":"jsconfig.json <span style='color:#111;'> 280B </span>","children":null,"spread":false},{"title":"project.json <span style='color:#111;'> 60B </span>","children":null,"spread":false},{"title":"assets","children":[{"title":"resources.meta <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":"resources","children":[{"title":"ani","children":[{"title":"move.anim.meta <span style='color:#111;'> 88B </span>","children":null,"spread":false},{"title":"move.anim <span style='color:#111;'> 371B </span>","children":null,"spread":false}],"spread":true},{"title":"texture.meta <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":"texture","children":[{"title":"texture.zip <span style='color:#111;'> 83.27KB </span>","children":null,"spread":false},{"title":"jump.mp3.meta <span style='color:#111;'> 109B </span>","children":null,"spread":false},{"title":"robot_left.png.meta <span style='color:#111;'> 716B </span>","children":null,"spread":false},{"title":"r1.png <span style='color:#111;'> 48.25KB </span>","children":null,"spread":false},{"title":"failed.mp3.meta <span style='color:#111;'> 109B </span>","children":null,"spread":false},{"title":"robot_left.png <span style='color:#111;'> 4.54KB </span>","children":null,"spread":false},{"title":"audio_on.png.meta <span style='color:#111;'> 712B </span>","children":null,"spread":false},{"title":"l2.png.meta <span style='color:#111;'> 706B </span>","children":null,"spread":false},{"title":"l1.png <span style='color:#111;'> 55.70KB </span>","children":null,"spread":false},{"title":"again.png <span style='color:#111;'> 4.07KB </span>","children":null,"spread":false},{"title":"audio_off.png <span style='color:#111;'> 1.83KB </span>","children":null,"spread":false},{"title":"r2.png <span style='color:#111;'> 43.93KB </span>","children":null,"spread":false},{"title":"again.png.meta <span style='color:#111;'> 709B </span>","children":null,"spread":false},{"title":"robot_right.png <span style='color:#111;'> 10.02KB </span>","children":null,"spread":false},{"title":"texture.zip.meta <span style='color:#111;'> 88B </span>","children":null,"spread":false},{"title":"bg.png <span style='color:#111;'> 150.54KB </span>","children":null,"spread":false},{"title":"audio_on.png <span style='color:#111;'> 1.81KB </span>","children":null,"spread":false},{"title":"l1.png.meta <span style='color:#111;'> 706B </span>","children":null,"spread":false},{"title":"points.png <span style='color:#111;'> 15.97KB </span>","children":null,"spread":false},{"title":"l2.png <span style='color:#111;'> 56.68KB </span>","children":null,"spread":false},{"title":"start.png <span style='color:#111;'> 7.60KB </span>","children":null,"spread":false},{"title":"points.labelatlas.meta <span style='color:#111;'> 228B </span>","children":null,"spread":false},{"title":"bg.png.meta <span style='color:#111;'> 706B </span>","children":null,"spread":false},{"title":"audio_off.png.meta <span style='color:#111;'> 710B </span>","children":null,"spread":false},{"title":"r1.png.meta <span style='color:#111;'> 706B </span>","children":null,"spread":false},{"title":"points.png.meta <span style='color:#111;'> 711B </span>","children":null,"spread":false},{"title":"box.png <span style='color:#111;'> 3.42KB </span>","children":null,"spread":false},{"title":"robot_right.png.meta <span style='color:#111;'> 717B </span>","children":null,"spread":false},{"title":"points.labelatlas <span style='color:#111;'> 37B </span>","children":null,"spread":false},{"title":"failed.mp3 <span style='color:#111;'> 119.68KB </span>","children":null,"spread":false},{"title":"box.png.meta <span style='color:#111;'> 709B </span>","children":null,"spread":false},{"title":"jump.mp3 <span style='color:#111;'> 1.88KB </span>","children":null,"spread":false},{"title":"r2.png.meta <span style='color:#111;'> 708B </span>","children":null,"spread":false},{"title":"start.png.meta <span style='color:#111;'> 708B </span>","children":null,"spread":false}],"spread":false},{"title":"scene","children":[{"title":"end.fire.meta <span style='color:#111;'> 146B </span>","children":null,"spread":false},{"title":"home.fire.meta <span style='color:#111;'> 146B </span>","children":null,"spread":false},{"title":"end.fire <span style='color:#111;'> 19.46KB </span>","children":null,"spread":false},{"title":"game.fire <span style='color:#111;'> 53.88KB </span>","children":null,"spread":false},{"title":"home.fire <span style='color:#111;'> 9.75KB </span>","children":null,"spread":false},{"title":"game.fire.meta <span style='color:#111;'> 146B </span>","children":null,"spread":false}],"spread":true},{"title":"prefab.meta <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":"scene.meta <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":"ani.meta <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":"prefab","children":[{"title":"box.prefab.meta <span style='color:#111;'> 148B </span>","children":null,"spread":false},{"title":"box.prefab <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"scripts","children":[{"title":"Robot.ts <span style='color:#111;'> 5.60KB </span>","children":null,"spread":false},{"title":"BoxMgr.ts <span style='color:#111;'> 6.97KB </span>","children":null,"spread":false},{"title":"Home.ts <span style='color:#111;'> 1.24KB </span>","children":null,"spread":false},{"title":"NodeMgr.ts.meta <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"Box.ts.meta <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"NodeMgr.ts <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"Game.ts <span style='color:#111;'> 4.10KB </span>","children":null,"spread":false},{"title":"Robot.ts.meta <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"Home.ts.meta <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"Game.ts.meta <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"BoxMgr.ts.meta <span style='color:#111;'> 197B </span>","children":null,"spread":false},{"title":"Box.ts <span style='color:#111;'> 1.81KB </span>","children":null,"spread":false}],"spread":false},{"title":"scripts.meta <span style='color:#111;'> 137B </span>","children":null,"spread":false}],"spread":true},{"title":"settings","children":[{"title":"services.json <span style='color:#111;'> 6.65KB </span>","children":null,"spread":false},{"title":"project.json <span style='color:#111;'> 666B </span>","children":null,"spread":false},{"title":"builder.json <span style='color:#111;'> 973B </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"creator.d.ts <span style='color:#111;'> 866.01KB </span>","children":null,"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明