大禹治水优化好
|
@ -1423,8 +1423,8 @@
|
|||
"__id__": 4
|
||||
},
|
||||
"_enabled": true,
|
||||
"localTest": true,
|
||||
"clientTestVersion": "1.1.5",
|
||||
"localTest": false,
|
||||
"clientTestVersion": "1.2.9",
|
||||
"testVersion": {
|
||||
"__id__": 19
|
||||
},
|
||||
|
|
|
@ -61,6 +61,13 @@ export default class NewClass extends cc.Component {
|
|||
start () {
|
||||
|
||||
}
|
||||
/**
|
||||
* 息壤过后改变修筑路径
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param number 息壤执行长度,改变息壤用后其他路径的X或Y值
|
||||
* @param direction 只为两个方向,横向false,纵向true
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
//初始化地图块数据
|
||||
initData(type,pos,max){
|
||||
this.block_Type = type;
|
||||
|
@ -69,9 +76,9 @@ export default class NewClass extends cc.Component {
|
|||
if(type == cc.Enum(BlockType).Start){
|
||||
var bg = this.node.getChildByName("sp");
|
||||
// this.node.getComponent(cc.Sprite).spriteFrame = null;
|
||||
bg.getComponent(cc.Sprite).spriteFrame = this.UI["_spriteFrames"]["start"];
|
||||
// bg.getComponent(cc.Sprite).spriteFrame = this.UI["_spriteFrames"]["start"];
|
||||
if(cc.fx.GameConfig.GM_INFO.level > 3){
|
||||
bg.getChildByName("start").y = 20;
|
||||
// bg.getChildByName("start").y = 20;
|
||||
bg.getChildByName("end").y = 20;
|
||||
}
|
||||
this.rotateTarget(bg,"start",pos,max);
|
||||
|
@ -81,7 +88,7 @@ export default class NewClass extends cc.Component {
|
|||
// this.node.getComponent(cc.Sprite).spriteFrame = null;
|
||||
bg.getComponent(cc.Sprite).spriteFrame = this.UI["_spriteFrames"]["end"];
|
||||
if(cc.fx.GameConfig.GM_INFO.level > 3){
|
||||
bg.getChildByName("start").y = 20;
|
||||
// bg.getChildByName("start").y = 20;
|
||||
bg.getChildByName("end").y = 20;
|
||||
}
|
||||
this.rotateTarget(bg,"end",pos,max);
|
||||
|
@ -268,10 +275,13 @@ export default class NewClass extends cc.Component {
|
|||
}
|
||||
//息壤具体执行方法 外部可调用
|
||||
set_Xi_SoilType(direction,end,name){
|
||||
// console.log("息壤",direction,name,this.block_Type);
|
||||
// console.log("息壤",direction,name,end);
|
||||
var jg = this.repeatRoad(true,direction);
|
||||
console.log("息壤重复判断结果",jg);
|
||||
if(jg == true) return;
|
||||
if(jg == true){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.block_Type == cc.Enum(BlockType).Start){
|
||||
this.set_Xi_Soil(direction,false);
|
||||
|
@ -302,6 +312,7 @@ export default class NewClass extends cc.Component {
|
|||
}
|
||||
else{
|
||||
}
|
||||
|
||||
let target = this.node.getChildByName("Xi_Soil");
|
||||
this.path_Type = direction;
|
||||
target.active = true;
|
||||
|
@ -329,12 +340,12 @@ export default class NewClass extends cc.Component {
|
|||
repeatRoad(type,direction){
|
||||
//如果双向都占用了还进来就算死了-
|
||||
var jg = false;
|
||||
|
||||
if(this.node.getChildByName("vertical2").active == true && this.node.getChildByName("horizontal2").active == true){
|
||||
// alert("治水失败");
|
||||
jg = true;
|
||||
if(type){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -343,26 +354,30 @@ export default class NewClass extends cc.Component {
|
|||
jg = true;
|
||||
if(type){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
}
|
||||
}
|
||||
|
||||
if(direction){
|
||||
if(this.node.getChildByName("vertical2").active == true && this.block_Type == cc.Enum(BlockType).Xi_Soil && (direction == "up"|| direction =="down")){
|
||||
// alert("治水失败");
|
||||
jg = true;
|
||||
if(type){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
if(this.node.getChildByName("vertical2").angle == 0 || this.node.getChildByName("vertical2").angle == 180 ){
|
||||
jg = true;
|
||||
if(type){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if(this.node.getChildByName("horizontal2").active == true && this.block_Type == cc.Enum(BlockType).Xi_Soil && (direction == "right"|| direction =="left")){
|
||||
else if(this.node.getChildByName("vertical2").active == true && this.block_Type == cc.Enum(BlockType).Xi_Soil && (direction == "right"|| direction =="left")){
|
||||
// alert("治水失败");
|
||||
jg = true;
|
||||
if(type){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
}
|
||||
if(this.node.getChildByName("vertical2").angle == 90 || this.node.getChildByName("vertical2").angle == 270 ){
|
||||
jg = true;
|
||||
if(type){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -482,7 +497,6 @@ export default class NewClass extends cc.Component {
|
|||
target = this.node.getChildByName("Reinforce");
|
||||
if(this.block_Type == cc.Enum(BlockType).Peak){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
return;
|
||||
}
|
||||
if(this.block_Type != cc.Enum(BlockType).End)this.block_Type = cc.Enum(BlockType).Reinforce;
|
||||
|
@ -535,7 +549,7 @@ export default class NewClass extends cc.Component {
|
|||
direction = "down";
|
||||
}
|
||||
|
||||
console.log("结束方向:",direction);
|
||||
// console.log("结束方向:",direction);
|
||||
if(!this.finishi){
|
||||
this.finishi = true;
|
||||
this.set_Xi_Soil(direction,true);
|
||||
|
@ -588,7 +602,6 @@ export default class NewClass extends cc.Component {
|
|||
if(this.node.getChildByName("vertical").active == true && this.node.getChildByName("horizontal").active == true){
|
||||
// alert("治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
// cc.director.loadScene("GameScene");
|
||||
return;
|
||||
}
|
||||
|
@ -596,7 +609,6 @@ export default class NewClass extends cc.Component {
|
|||
else if(this.node.getChildByName("turn").active == true && this.block_Type != cc.Enum(BlockType).Xi_Soil){
|
||||
// alert("治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
// cc.director.loadScene("GameScene");
|
||||
return;
|
||||
}
|
||||
|
@ -724,7 +736,6 @@ export default class NewClass extends cc.Component {
|
|||
.call(()=>{
|
||||
// alert("治水成功");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"win");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,true);
|
||||
|
||||
if(cc.fx.GameConfig.GM_INFO.level < 7){
|
||||
cc.fx.GameConfig.GM_INFO.level += 1;
|
||||
|
@ -759,7 +770,6 @@ export default class NewClass extends cc.Component {
|
|||
.call(() =>{
|
||||
// alert("治水失败")
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
// cc.director.loadScene("GameScene");
|
||||
|
||||
})
|
||||
|
|
|
@ -25,6 +25,7 @@ export default class NewClass extends cc.Component {
|
|||
canTouch:boolean;
|
||||
Reinforce:boolean;
|
||||
Soil:boolean;
|
||||
mapHeight:number;
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
// onLoad () {}
|
||||
|
@ -35,15 +36,16 @@ export default class NewClass extends cc.Component {
|
|||
this.canTouch = true;
|
||||
this.Reinforce = false;
|
||||
this.Soil = false;
|
||||
this.mapHeight = 0;
|
||||
}
|
||||
|
||||
setPosition(tip){
|
||||
tip.setPosition(30,-35);
|
||||
tip.setPosition(30,-25);
|
||||
if(this.tipArray.length > 0){
|
||||
let length = this.tipArray.length+1;
|
||||
let posY = Math.ceil(length/8) - 1;
|
||||
let posX = length - Math.floor(posY)*8 - 1;
|
||||
tip.setPosition(30 + 48*posX,-35 -48*posY);
|
||||
tip.setPosition(30 + 48*posX,-25 -48*posY + this.mapHeight);
|
||||
}
|
||||
}
|
||||
//清空所有
|
||||
|
@ -62,6 +64,7 @@ export default class NewClass extends cc.Component {
|
|||
var drawingReset = cc.fx.GameConfig.CLICK_DATA.drawingReset + 1;
|
||||
cc.fx.GameConfig.CLICK_SET("drawingReset",drawingReset);
|
||||
cc.fx.Notifications.emit(cc.fx.Message.removeTip,"remove");
|
||||
this.mapHeight = 0;
|
||||
}
|
||||
}
|
||||
//撤回一步
|
||||
|
@ -78,6 +81,11 @@ export default class NewClass extends cc.Component {
|
|||
var drawingBack = cc.fx.GameConfig.CLICK_DATA.drawingBack + 1;
|
||||
cc.fx.GameConfig.CLICK_SET("drawingBack",drawingBack);
|
||||
cc.fx.Notifications.emit(cc.fx.Message.removeTip,"back");
|
||||
if(this.tipArray.length >= 24){
|
||||
if((this.tipArray.length )%8 == 0){
|
||||
this.mapMove(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +148,22 @@ export default class NewClass extends cc.Component {
|
|||
|
||||
this.tipArray.push(tip);
|
||||
this.controlArray.push(data);
|
||||
|
||||
|
||||
if(this.tipArray.length >= 25){
|
||||
if((this.tipArray.length - 1)%8 == 0){
|
||||
this.mapMove(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
//地图放不下了上下移动
|
||||
mapMove(type){
|
||||
if(type) this.mapHeight += 48;
|
||||
else this.mapHeight -= 48;
|
||||
for(let i=0; i<this.tipArray.length;i++){
|
||||
let tip = this.tipArray[i];
|
||||
if(type)tip.y += 48;
|
||||
else tip.y -= 48;
|
||||
}
|
||||
}
|
||||
|
||||
//点击开始 创建河道
|
||||
|
|
|
@ -53,15 +53,6 @@ export default class GameManager extends cc.Component {
|
|||
|
||||
//处理地图数据 第一关完全随机,从第二关开始,赢了根据5秒洪峰来临增加难度步数,输了当前难度减步数
|
||||
getMap(){
|
||||
// var temp = [];
|
||||
// for(let k=0; k<cc.fx.GameConfig.LEVEL_INFO.length; k++){
|
||||
// temp[k] = [];
|
||||
// for(let j=0; j<cc.fx.GameConfig.LEVEL_INFO[k].length; j++){
|
||||
// temp[k].push(cc.fx.GameConfig.LEVEL_INFO[k][j].min_steps);
|
||||
// }
|
||||
// }
|
||||
// console.log(temp);
|
||||
|
||||
var custom = 0;
|
||||
var map = [];
|
||||
if(cc.fx.GameConfig.GM_INFO.level == 1){
|
||||
|
@ -80,14 +71,19 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
var random = Math.floor(Math.random()* map.length);
|
||||
custom = map[random];
|
||||
console.log(custom,map);
|
||||
// console.log(custom,map);
|
||||
}
|
||||
//记录当前最小步数
|
||||
cc.fx.GameConfig.GM_INFO.min_Steps = cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][custom].min_steps;
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = 0;
|
||||
return custom;
|
||||
}
|
||||
//获取下一关难度,步数增加2或者1,如果没有则降到有.
|
||||
/**
|
||||
* 获取下一关难度,步数增加2或者1,如果没有则降到有.
|
||||
* @param arr 配置里读取,当前(x*x)地图等级内所有地图数组
|
||||
* @param min_steps 最佳步数,下一关难度或者输了降难度,根据最佳步数增加或者减少。
|
||||
* @param type true为增加步数,false为输了降低难度步数
|
||||
*/
|
||||
getMapArray(arr,min_steps,type){
|
||||
var map = [];
|
||||
for(let i=0; i<arr.length; i++){
|
||||
|
@ -121,6 +117,9 @@ export default class GameManager extends cc.Component {
|
|||
this.replaceTime = 0;
|
||||
this.startTime = cc.fx.GameTool.getTime();
|
||||
this.countTime = cc.fx.GameConfig.TIME_INFO.totalTime;
|
||||
if(this.countTime == 0 ){
|
||||
this.gameOver();
|
||||
}
|
||||
this.waterTime = cc.fx.GameConfig.TIME_INFO.waterTime[cc.fx.GameConfig.GM_INFO.level];
|
||||
// if(this.countTime < this.waterTime) this.replaceTime = this.countTime;
|
||||
this.Time.string = cc.fx.GameTool.getTimeMargin(this.countTime);
|
||||
|
@ -167,14 +166,16 @@ export default class GameManager extends cc.Component {
|
|||
else if(!cc.fx.GameConfig.GM_INFO.guide){
|
||||
this.custom = this.getMap();
|
||||
}
|
||||
console.log(this.custom);
|
||||
|
||||
// this.custom = 7;
|
||||
// console.log(this.custom);
|
||||
|
||||
let arr = cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][this.custom].map;
|
||||
if(cc.fx.GameConfig.GM_INFO.level == 0){
|
||||
this.Map.scale = 1.2;
|
||||
}
|
||||
this.node.getChildByName("Top").getChildByName("id").getComponent(cc.Label).string =
|
||||
cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][this.custom].id;
|
||||
cc.fx.GameConfig.GM_INFO.score;
|
||||
|
||||
//将地图x,y轴切换
|
||||
this.map_Array = arr[0].map((item, i) => {
|
||||
return arr.map((val) => val[i])
|
||||
|
@ -200,8 +201,10 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
//开始后,按玩家操作,将路径中地图块放入数组中
|
||||
/**
|
||||
* 开始后,按玩家操作,将路径中地图块放入数组中
|
||||
* @param data 根据当前操作,添加建筑地图数组
|
||||
*/
|
||||
setMap(data){
|
||||
for(let i=0; i<data.length; i++){
|
||||
let start = this.path_Array[this.path_Array.length-1];
|
||||
|
@ -231,9 +234,13 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
this.runRoad(0);
|
||||
}
|
||||
//开始执行洪峰来了的动画
|
||||
/**
|
||||
* 开始执行洪峰来了的动画
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
*/
|
||||
runRoad(order){
|
||||
order = parseInt(order);
|
||||
|
||||
if(order > 0){
|
||||
if(this.path_Array[order-1].z == 0){
|
||||
//console.log("1正常放入",this.path_Array[order-1].x,this.path_Array[order-1].y,this.path_Array[order-1].z)
|
||||
|
@ -248,6 +255,7 @@ export default class GameManager extends cc.Component {
|
|||
this.changeWater(cc.v3(this.path_Array[order].x,this.path_Array[order].y,0));
|
||||
}
|
||||
}
|
||||
|
||||
if(order <= this.path_Array.length-1){
|
||||
let i = this.path_Array[order].x*this.map_Array[0].length+this.path_Array[order].y;
|
||||
let direction = "";
|
||||
|
@ -262,7 +270,6 @@ export default class GameManager extends cc.Component {
|
|||
setTimeout(() => {
|
||||
if(!this.plan_over){
|
||||
this.plan_over = true;
|
||||
this.unschedule(this.updateWaterTime);
|
||||
var head = this.node.getChildByName("Top").getChildByName("head");
|
||||
var progress = this.node.getChildByName("Top").getChildByName("progress").getComponent(cc.Sprite);
|
||||
head.stopAllActions();
|
||||
|
@ -276,7 +283,7 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
else{
|
||||
direction = "err";
|
||||
console.log("进入结束err");
|
||||
// console.log("进入结束err");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -290,7 +297,8 @@ export default class GameManager extends cc.Component {
|
|||
direction = "Xi_Soil";
|
||||
}
|
||||
else if(this.path_Array[order+1].z == 6 && order == 0 && order + 1 < this.path_Array.length){
|
||||
direction = this.getDirection(order+1,this.path_Array);
|
||||
// direction = this.getDirection(order+1,this.path_Array);
|
||||
direction = this.getDirection(order,this.path_Array);
|
||||
}
|
||||
else{
|
||||
direction = this.getDirection(order,this.path_Array);
|
||||
|
@ -308,11 +316,15 @@ export default class GameManager extends cc.Component {
|
|||
// if(direction == "" || jg == false) return;
|
||||
if(direction == "err" || direction == "" || jg == false){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
|
||||
return;
|
||||
}
|
||||
if( i<0 || i > (this.block_Array.length-1)){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
return;
|
||||
}
|
||||
|
||||
let target = this.block_Array[i].getComponent("Block");
|
||||
|
||||
target.setPath(direction);
|
||||
|
||||
if(order > 0 && order < this.path_Array.length-1){
|
||||
|
@ -347,7 +359,14 @@ export default class GameManager extends cc.Component {
|
|||
target.runRoad(data);
|
||||
}
|
||||
}
|
||||
//判断边界。或者撞山,或者湿地没有加固
|
||||
/**
|
||||
* 判断边界。或者撞山,或者湿地没有加固
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param x 当前操作地块横坐标
|
||||
* @param y 当前操作地块纵坐标
|
||||
* @param direction 当前操作方向,若不是方向则为息壤或者加固
|
||||
* @param road 建筑地图数组,可理解为路径数组,path_Array
|
||||
*/
|
||||
getBoundary(order,x,y,direction,road){
|
||||
let jg = true;
|
||||
if(x < 0 || x >= this.map_Width || y < 0 || y >= this.map_Hight){
|
||||
|
@ -355,7 +374,6 @@ export default class GameManager extends cc.Component {
|
|||
// console.log("超过边界,游戏结束");
|
||||
// alert("超过边界,治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
}
|
||||
else {
|
||||
let i = road[order].x*this.map_Array[0].length+road[order].y;
|
||||
|
@ -365,20 +383,20 @@ export default class GameManager extends cc.Component {
|
|||
// console.log("修筑山峰,游戏结束");
|
||||
// alert("修筑山峰,治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
}
|
||||
else if(target.block_Type == 2 && direction != "Reinforce"){
|
||||
jg = false;
|
||||
// console.log("修筑未加固湿地,游戏结束");
|
||||
// alert("修筑未加固湿地,游戏结束");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
}
|
||||
}
|
||||
return jg;
|
||||
}
|
||||
|
||||
//开始执行洪峰来了的动画
|
||||
/**
|
||||
* 开始执行洪峰来了的动画
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
*/
|
||||
runWater(order){
|
||||
order = parseInt(order);
|
||||
|
||||
|
@ -414,7 +432,6 @@ export default class GameManager extends cc.Component {
|
|||
let jg = this.getBoundary(order,this.water_Array[order].x,this.water_Array[order].y,direction,this.water_Array);
|
||||
if(direction == "" || jg == false || direction == "err"){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
return;
|
||||
}
|
||||
let target = this.block_Array[i].getComponent("Block");
|
||||
|
@ -451,7 +468,11 @@ export default class GameManager extends cc.Component {
|
|||
target.runWater(data);
|
||||
}
|
||||
}
|
||||
//获取息壤的格子的方向
|
||||
/**
|
||||
* 获取息壤的格子的方向
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
getXi_Soil(order,road){
|
||||
var direction = null;
|
||||
//如果息壤后面还有下一步的话
|
||||
|
@ -472,12 +493,19 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
return direction;
|
||||
}
|
||||
//设置息壤
|
||||
/**
|
||||
* 设置息壤执行方法
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
* @param name road或者water,建筑路径或者洪峰路径
|
||||
*/
|
||||
set_Soil(order,road,name){
|
||||
var direction = this.getXi_Soil(order,road);
|
||||
|
||||
var length = 0;
|
||||
if(direction == "right"){
|
||||
length = this.map_Width - 1;
|
||||
// let temp = this.map_Width - 1;
|
||||
for(let i=road[order].x;i<=length;i++){
|
||||
let n = i*this.map_Array[0].length+road[order].y;
|
||||
let target = this.block_Array[n].getComponent("Block");
|
||||
|
@ -489,13 +517,15 @@ export default class GameManager extends cc.Component {
|
|||
i = 10000;
|
||||
break;
|
||||
}
|
||||
}this.scheduleOnce
|
||||
|
||||
}
|
||||
}
|
||||
else if(direction == "left"){
|
||||
length = 0;
|
||||
for(let i=road[order].x;i>=length;i--){
|
||||
let n = i*this.map_Array[0].length+road[order].y;
|
||||
let target = this.block_Array[n].getComponent("Block");
|
||||
|
||||
if(target.block_Type == 3 || target.block_Type == 4){
|
||||
length = i + 1;
|
||||
if(target.block_Type == 4){
|
||||
|
@ -508,10 +538,10 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
else if(direction == "up"){
|
||||
length = 0;
|
||||
|
||||
for(let i=road[order].y;i>=length;i--){
|
||||
let n = road[order].x*this.map_Array[0].length + i;
|
||||
let target = this.block_Array[n].getComponent("Block");
|
||||
|
||||
if(target.block_Type == 3 || target.block_Type == 4){
|
||||
length = i + 1;
|
||||
if(target.block_Type == 4){
|
||||
|
@ -527,7 +557,6 @@ export default class GameManager extends cc.Component {
|
|||
for(let i=road[order].y;i<=length;i++){
|
||||
let n = road[order].x*this.map_Array[0].length + i;
|
||||
let target = this.block_Array[n].getComponent("Block");
|
||||
|
||||
if(target.block_Type == 3 || target.block_Type == 4){
|
||||
length = i-1;
|
||||
if(target.block_Type == 4){
|
||||
|
@ -536,23 +565,25 @@ export default class GameManager extends cc.Component {
|
|||
i = 10000;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// if(length == 0){
|
||||
|
||||
// }
|
||||
|
||||
this.soil_Find(direction,order,length,road,name);
|
||||
}
|
||||
//查找息壤蛮遗憾路径
|
||||
soil_Find(direction,order,length,road,name){
|
||||
|
||||
let start = road[order].x;
|
||||
if(direction == "right"){
|
||||
for(let i = start; i<=length; i++){
|
||||
let n = i*this.map_Array[0].length+road[order].y;
|
||||
let target = this.block_Array[n].getComponent("Block");
|
||||
if(i == start){
|
||||
if(i == start && i==length) target.set_Xi_SoilType(this.getDirection(order,road),order,name);
|
||||
if(i == start && i==length){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order,road),order,name);
|
||||
}
|
||||
else target.set_Xi_SoilType(this.getDirection(order,road),null,name);
|
||||
let value = cc.v3(this.path_Array[order].x,this.path_Array[order].y,0);
|
||||
if(this.water_Array[this.water_Array.length-1] != value){
|
||||
|
@ -576,7 +607,10 @@ export default class GameManager extends cc.Component {
|
|||
let n = i*this.map_Array[0].length+road[order].y;
|
||||
let target = this.block_Array[n].getComponent("Block");
|
||||
if(i == start){
|
||||
if(i == start && i==length) target.set_Xi_SoilType(this.getDirection(order,road),order,name);
|
||||
if(i == start && i==length){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order,road),order,name);
|
||||
}
|
||||
else target.set_Xi_SoilType(this.getDirection(order,road),null,name);
|
||||
let value = cc.v3(this.path_Array[order].x,this.path_Array[order].y,0);
|
||||
if(this.water_Array[this.water_Array.length-1] != value){
|
||||
|
@ -601,8 +635,13 @@ export default class GameManager extends cc.Component {
|
|||
let n = road[order].x*this.map_Array[0].length+i;
|
||||
let target = this.block_Array[n].getComponent("Block");
|
||||
if(i == start){
|
||||
if(i == start && i==length) target.set_Xi_SoilType(this.getDirection(order,road),order,name);
|
||||
else target.set_Xi_SoilType(this.getDirection(order,road),null,name);
|
||||
if(i == start && i==length){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order,road),order,name);
|
||||
}
|
||||
else{
|
||||
target.set_Xi_SoilType(this.getDirection(order,road),null,name);
|
||||
}
|
||||
let value = cc.v3(this.path_Array[order].x,this.path_Array[order].y,0);
|
||||
if(this.water_Array[this.water_Array.length-1] != value){
|
||||
// console.log("特别插入:",this.path_Array[order].x,this.path_Array[order].y);
|
||||
|
@ -627,7 +666,10 @@ export default class GameManager extends cc.Component {
|
|||
let n = road[order].x*this.map_Array[0].length+i;
|
||||
let target = this.block_Array[n].getComponent("Block");
|
||||
if(i == start){
|
||||
if(i == start && i==length) target.set_Xi_SoilType(this.getDirection(order,road),order,name);
|
||||
if(i == start && i==length){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order,road),order,name);
|
||||
}
|
||||
else target.set_Xi_SoilType(this.getDirection(order,road),null,name);
|
||||
let value = cc.v3(this.path_Array[order].x,this.path_Array[order].y,0);
|
||||
if(this.water_Array[this.water_Array.length-1] != value){
|
||||
|
@ -648,7 +690,10 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
}
|
||||
|
||||
//改变水流地图
|
||||
/**
|
||||
* 改变水流地图
|
||||
* @param value 需要根据使用息壤情况,插入到洪峰路径的点
|
||||
*/
|
||||
changeWater(value){
|
||||
let jg = true;
|
||||
if(this.water_Array.length > 0){
|
||||
|
@ -658,8 +703,13 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
if(jg) this.water_Array.push(value);
|
||||
}
|
||||
|
||||
//息壤过后改变修筑路径
|
||||
/**
|
||||
* 息壤过后改变修筑路径
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param number 息壤执行长度,改变息壤用后其他路径的X或Y值
|
||||
* @param direction 只为两个方向,横向false,纵向true
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
changePath(order,number,direction,road){
|
||||
|
||||
for(let i = (order+1); i<road.length; i++){
|
||||
|
@ -698,13 +748,16 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//获取洪峰方向
|
||||
/**
|
||||
* 获取洪峰方向
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
getDirection(order,road){
|
||||
var name = "";
|
||||
//入海口比较复杂单独判断
|
||||
if(order == 0){
|
||||
if(this.path_Array[order+1].z == 6 && road == this.path_Array) order += 1;
|
||||
let nextX = road[order+1].x - road[order].x;
|
||||
let nextY = road[order].y - road[order+1].y;
|
||||
//在底边
|
||||
|
@ -833,9 +886,12 @@ export default class GameManager extends cc.Component {
|
|||
backScene(){
|
||||
cc.director.loadScene("LoadScene");
|
||||
}
|
||||
|
||||
//开始游戏
|
||||
/**
|
||||
* 开始修筑
|
||||
* @param data 记录操作的数组
|
||||
*/
|
||||
startGame(data){
|
||||
this.unschedule(this.updateWaterTime);
|
||||
for(let i=0; i<this.block_Array.length;i++){
|
||||
this.block_Array[i].getChildByName("tipWin").active = false;
|
||||
this.block_Array[i].getChildByName("tipLose").active = false;
|
||||
|
@ -860,7 +916,10 @@ export default class GameManager extends cc.Component {
|
|||
cc.fx.GameConfig.CLICK_SET("stepList",arr);
|
||||
}
|
||||
|
||||
//用于埋点记录
|
||||
/**
|
||||
* 用于埋点记录 转变方向名称为埋点所需要格式
|
||||
* @param data 记录操作的数组
|
||||
*/
|
||||
changeStep(data){
|
||||
var arr = [];
|
||||
if(data.length > 0){
|
||||
|
@ -888,7 +947,6 @@ export default class GameManager extends cc.Component {
|
|||
setTimeout(() => {
|
||||
if(this.water_Array.length == 0){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult,"lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,false);
|
||||
}
|
||||
else{
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = this.waterTime;
|
||||
|
@ -916,13 +974,13 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
if(this.countTime <= 0){
|
||||
this.countTime = 0;
|
||||
this.setData(false);
|
||||
this.setData("lose");
|
||||
this.unschedule(this.updateCountDownTime);
|
||||
this.gameOver();
|
||||
}
|
||||
}
|
||||
}
|
||||
//上传每次操作数据
|
||||
//上传每次操作数据 success为成功还是失败
|
||||
setData(success){
|
||||
//设置埋点数据
|
||||
cc.fx.GameConfig.CLICK_SET("mapId",cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][this.custom].id);
|
||||
|
@ -931,12 +989,15 @@ export default class GameManager extends cc.Component {
|
|||
cc.fx.GameConfig.CLICK_SET("round",cc.fx.GameConfig.GM_INFO.round);
|
||||
cc.fx.GameConfig.CLICK_SET("timer",cc.fx.GameConfig.TIME_INFO.totalTime);
|
||||
cc.fx.GameConfig.CLICK_SET("cumulativeScore",cc.fx.GameConfig.GM_INFO.score);
|
||||
success = success =="lose"?false:true
|
||||
if(success != null){
|
||||
cc.fx.GameConfig.CLICK_SET("success",success);
|
||||
cc.fx.GameConfig.GM_INFO.fen = this.getScore();
|
||||
if(!success) cc.fx.GameConfig.GM_INFO.fen = 0;
|
||||
cc.fx.GameConfig.CLICK_SET("getScore",cc.fx.GameConfig.GM_INFO.fen);
|
||||
cc.fx.GameConfig.GM_INFO.score += cc.fx.GameConfig.GM_INFO.fen;
|
||||
this.node.getChildByName("Top").getChildByName("id").getComponent(cc.Label).string =
|
||||
cc.fx.GameConfig.GM_INFO.score;
|
||||
cc.fx.GameConfig.CLICK_SET("cumulativeScore",cc.fx.GameConfig.GM_INFO.score);
|
||||
if(this.countTime != 0)cc.fx.GameConfig.GM_INFO.successList.push(success);
|
||||
}
|
||||
|
@ -984,26 +1045,29 @@ export default class GameManager extends cc.Component {
|
|||
})
|
||||
.start()
|
||||
}
|
||||
//展示结果
|
||||
//展示结果 data为成功或者失败
|
||||
showResult(data){
|
||||
if(data == "lose"){
|
||||
cc.fx.AudioManager._instance.playEffect("lose",null);
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = -1;
|
||||
}
|
||||
else{
|
||||
cc.fx.AudioManager._instance.playEffect("win",null);
|
||||
if(this.node.getChildByName("GameOver").active == false && this.node.getChildByName("Window").active == false){
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData,data);
|
||||
if(data == "lose"){
|
||||
cc.fx.AudioManager._instance.playEffect("lose",null);
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = -1;
|
||||
}
|
||||
else{
|
||||
cc.fx.AudioManager._instance.playEffect("win",null);
|
||||
}
|
||||
this.node.getChildByName("Window").active = true;
|
||||
this.node.getChildByName("Window").getComponent("Window").init(data);
|
||||
}
|
||||
this.node.getChildByName("Window").active = true;
|
||||
this.node.getChildByName("Window").getComponent("Window").init(data);
|
||||
|
||||
}
|
||||
//记录反应时长,以及做步骤提示
|
||||
//记录反应时长,以及做步骤提示 data为操作名称
|
||||
clickSun(data){
|
||||
//如果没有记录过 回合开始到操作反应时长,则第一次记录, 后面不记录
|
||||
if(cc.fx.GameConfig.CLICK_DATA.startTime == 0){
|
||||
|
||||
if(cc.fx.GameConfig.CLICK_DATA.startTime == -1){
|
||||
this.finishiTime = cc.fx.GameTool.getTime();
|
||||
var now = this.finishiTime - this.startTime;
|
||||
// console.log("startTime:",now,this.startTime);
|
||||
// console.log("startTime:",this.finishiTime);
|
||||
cc.fx.GameConfig.CLICK_SET("startTime",now);
|
||||
}
|
||||
if(cc.fx.GameConfig.GM_INFO.level > 3) return;
|
||||
|
@ -1054,9 +1118,9 @@ export default class GameManager extends cc.Component {
|
|||
}
|
||||
|
||||
}
|
||||
//提示是否错误
|
||||
//提示是否错误 只前三关有 ,pos为位置,data为操作方向
|
||||
tipCan(pos,data){
|
||||
|
||||
|
||||
//先判断是否出边界
|
||||
if(pos.x <0 || pos.x >this.map_Array.length-1 || pos.y <0 || pos.y > this.map_Array[0].length-1 ){
|
||||
this.tip_Array.push(null);
|
||||
|
@ -1065,21 +1129,28 @@ export default class GameManager extends cc.Component {
|
|||
let n = pos.x*this.map_Array[0].length+pos.y;
|
||||
let target = this.block_Array[n].getComponent("Block");
|
||||
target.node.getChildByName("tipWin").active = true;
|
||||
// target.node.getChildByName("tipWin").opacity = 255;
|
||||
// target.node.getChildByName("tipLose").opacity = 255;
|
||||
|
||||
//重复路回头路,或者山峰
|
||||
if(target.repeatRoad(false,null) == true || target.block_Type == 3){
|
||||
this.tip_Array.push([cc.v3(pos.x,pos.y,0)]);
|
||||
target.node.getChildByName("tipLose").active = true;
|
||||
target.node.getChildByName("tipWin").active = false;
|
||||
}
|
||||
//湿地 上一步如果没用息壤或者加固
|
||||
else if(target.block_Type == 2){
|
||||
if(this.tip_Array.length > 1){
|
||||
if(this.tip_Array.length > 0){
|
||||
if(this.tip_Array[this.tip_Array.length-1][0].z == 0){
|
||||
target.node.getChildByName("tipLose").active = true;
|
||||
target.node.getChildByName("tipWin").active = false;
|
||||
}
|
||||
else if(this.tip_Array[this.tip_Array.length-1][0].z == 2){
|
||||
target.node.getChildByName("tipLose").active = false;
|
||||
target.node.getChildByName("tipWin").active = true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
target.node.getChildByName("tipLose").active = true;
|
||||
target.node.getChildByName("tipWin").active = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,17 @@ export default class NewClass extends cc.Component {
|
|||
this.three.active = false;
|
||||
this.four.active = false;
|
||||
this.five.active = false;
|
||||
var urlNow = window.location.href;
|
||||
if(this.containsTrain(urlNow)){
|
||||
this.node.getChildByName("again").active = false;
|
||||
this.node.getChildByName("back").active = false;
|
||||
this.node.getChildByName("finishi").active = true;
|
||||
}
|
||||
else{
|
||||
this.node.getChildByName("again").active = true;
|
||||
this.node.getChildByName("back").active = true;
|
||||
this.node.getChildByName("finishi").active = false;
|
||||
}
|
||||
this.getRank();
|
||||
}
|
||||
//打开排行榜
|
||||
|
@ -62,8 +73,13 @@ export default class NewClass extends cc.Component {
|
|||
cc.fx.GameConfig.GM_INFO.score = 0;
|
||||
cc.fx.GameConfig.GM_INFO.min_Steps = 0;
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = 0;
|
||||
cc.fx.GameConfig.TIME_INFO.totalTime = 120;
|
||||
cc.director.loadScene("GameScene");
|
||||
}
|
||||
//判断来源
|
||||
containsTrain(str) {
|
||||
return /from=train/i.test(str);
|
||||
}
|
||||
//获取排行榜
|
||||
getRank(){
|
||||
//获取排行榜数据 所需数据量
|
||||
|
@ -72,6 +88,11 @@ export default class NewClass extends cc.Component {
|
|||
}
|
||||
cc.fx.GameTool.getRank(dataFile,data =>this.getRankData(data));
|
||||
}
|
||||
//打开排行榜
|
||||
jumpFinishi(){
|
||||
let url = "https://train.sparkus.cn/poster/game/";
|
||||
window.location.href = url;
|
||||
}
|
||||
//设置排行信息
|
||||
getRankData(data){
|
||||
|
||||
|
|
|
@ -19,6 +19,19 @@ export default class NewClass extends cc.Component {
|
|||
cc.fx.GameConfig.init(this.localTest);
|
||||
// cc.fx.AudioManager.Instance.init();
|
||||
this.testVersion.string = this.clientTestVersion;
|
||||
var urlNow = window.location.href;
|
||||
if(this.containsTrain(urlNow)){
|
||||
console.log("无排行版本");
|
||||
this.node.getChildByName("Rank").active = false;
|
||||
}
|
||||
else{
|
||||
console.log("有排行版本");
|
||||
}
|
||||
}
|
||||
|
||||
//判断来源
|
||||
containsTrain(str) {
|
||||
return /from=train/i.test(str);
|
||||
}
|
||||
|
||||
//开始游戏,跳转至引导页面
|
||||
|
|
13
assets/Script/Sdk.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "93c9bdf3-8205-46e5-a8f1-3576b0dbc836",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
1111
assets/Script/Sdk/MiniGameSdk.ts
Normal file
10
assets/Script/Sdk/MiniGameSdk.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "c1af99dd-ee03-40f7-9609-d3887d0dd357",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
|
@ -9,8 +9,11 @@ var GameTool = {
|
|||
let name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
|
||||
var data = JSON.parse(localStorage.getItem(name));
|
||||
if(data == "undifend" || data==null || data == ""){
|
||||
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
window.location.href = url;
|
||||
var urlNow = window.location.href;
|
||||
if(!this.containsTrain(urlNow)){
|
||||
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
else{
|
||||
cc.fx.StorageMessage.setStorage(name,data);
|
||||
|
@ -18,6 +21,10 @@ var GameTool = {
|
|||
}
|
||||
},
|
||||
|
||||
containsTrain(str) {
|
||||
return /from=train/i.test(str);
|
||||
},
|
||||
|
||||
//埋点上传
|
||||
setGameData(){
|
||||
//GAME_DATA 初始化 每次清零
|
||||
|
@ -33,7 +40,7 @@ var GameTool = {
|
|||
"data": data
|
||||
};
|
||||
|
||||
console.log("上传数据:",data);
|
||||
// console.log("上传数据:",data);
|
||||
cc.fx.HttpUtil.uploadUserLogData(postData,function(){})
|
||||
},
|
||||
//上传排行榜 type为1
|
||||
|
|
|
@ -42,13 +42,13 @@
|
|||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 26
|
||||
"__id__": 38
|
||||
},
|
||||
{
|
||||
"__id__": 41
|
||||
"__id__": 47
|
||||
},
|
||||
{
|
||||
"__id__": 50
|
||||
"__id__": 62
|
||||
},
|
||||
{
|
||||
"__id__": 65
|
||||
|
@ -559,7 +559,7 @@
|
|||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Xi_Soil",
|
||||
"_name": "vertical2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
|
@ -574,18 +574,18 @@
|
|||
"_prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_opacity": 0,
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
"width": 96,
|
||||
"height": 96
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
@ -636,10 +636,12 @@
|
|||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "b76603e2-c166-4ce9-af37-417cdedde12e"
|
||||
},
|
||||
"_type": 3,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
|
@ -648,7 +650,9 @@
|
|||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -659,12 +663,12 @@
|
|||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c1rnBrwplFLLvmPviKv2Ng",
|
||||
"fileId": "59m0Fk9O9EjJ2NMsw4izxI",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "vertical2",
|
||||
"_name": "turn2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
|
@ -742,18 +746,18 @@
|
|||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "b76603e2-c166-4ce9-af37-417cdedde12e"
|
||||
"__uuid__": "c01c7783-54ca-426a-b44e-173f4dba8a8a"
|
||||
},
|
||||
"_type": 3,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 1,
|
||||
"_fillType": 2,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 1,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
|
@ -768,12 +772,12 @@
|
|||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "59m0Fk9O9EjJ2NMsw4izxI",
|
||||
"fileId": "d5D4goRj5NHYJ9Ls2YiLkA",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "turn2",
|
||||
"_name": "horizontal2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
|
@ -850,115 +854,6 @@
|
|||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "c01c7783-54ca-426a-b44e-173f4dba8a8a"
|
||||
},
|
||||
"_type": 3,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 2,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0.25,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "d5D4goRj5NHYJ9Ls2YiLkA",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "horizontal2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 25
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 96,
|
||||
"height": 96
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "b76603e2-c166-4ce9-af37-417cdedde12e"
|
||||
},
|
||||
|
@ -998,17 +893,17 @@
|
|||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 39
|
||||
"__id__": 36
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 40
|
||||
"__id__": 37
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1062,27 +957,27 @@
|
|||
"_name": "wave",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 26
|
||||
"__id__": 23
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 25
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
},
|
||||
{
|
||||
"__id__": 31
|
||||
},
|
||||
{
|
||||
"__id__": 34
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 37
|
||||
"__id__": 34
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 38
|
||||
"__id__": 35
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1136,17 +1031,17 @@
|
|||
"_name": "water1",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 29
|
||||
"__id__": 26
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 30
|
||||
"__id__": 27
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1200,7 +1095,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 28
|
||||
"__id__": 25
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1245,17 +1140,17 @@
|
|||
"_name": "water2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 32
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 33
|
||||
"__id__": 30
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1309,7 +1204,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 31
|
||||
"__id__": 28
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1354,17 +1249,17 @@
|
|||
"_name": "water3",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 35
|
||||
"__id__": 32
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 36
|
||||
"__id__": 33
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1418,7 +1313,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 34
|
||||
"__id__": 31
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1463,7 +1358,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1494,7 +1389,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 26
|
||||
"__id__": 23
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1516,7 +1411,7 @@
|
|||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_fillRange": 1,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
|
@ -1543,17 +1438,17 @@
|
|||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 42
|
||||
"__id__": 39
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 48
|
||||
"__id__": 45
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 49
|
||||
"__id__": 46
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1607,21 +1502,21 @@
|
|||
"_name": "wave",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 41
|
||||
"__id__": 38
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 43
|
||||
"__id__": 40
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 46
|
||||
"__id__": 43
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 47
|
||||
"__id__": 44
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1675,17 +1570,17 @@
|
|||
"_name": "water",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 42
|
||||
"__id__": 39
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 44
|
||||
"__id__": 41
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 45
|
||||
"__id__": 42
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1739,7 +1634,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 43
|
||||
"__id__": 40
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1784,7 +1679,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 42
|
||||
"__id__": 39
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1815,7 +1710,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 41
|
||||
"__id__": 38
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1864,17 +1759,17 @@
|
|||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 63
|
||||
"__id__": 60
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 64
|
||||
"__id__": 61
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1903,8 +1798,8 @@
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
0.7071067811865475,
|
||||
0.7071067811865476,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
|
@ -1914,7 +1809,7 @@
|
|||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 90
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
|
@ -1928,27 +1823,27 @@
|
|||
"_name": "wave",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 50
|
||||
"__id__": 47
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 49
|
||||
},
|
||||
{
|
||||
"__id__": 52
|
||||
},
|
||||
{
|
||||
"__id__": 55
|
||||
},
|
||||
{
|
||||
"__id__": 58
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 61
|
||||
"__id__": 58
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 62
|
||||
"__id__": 59
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2002,17 +1897,17 @@
|
|||
"_name": "water1",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 53
|
||||
"__id__": 50
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 54
|
||||
"__id__": 51
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2066,7 +1961,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 52
|
||||
"__id__": 49
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2111,17 +2006,17 @@
|
|||
"_name": "water2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 56
|
||||
"__id__": 53
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 57
|
||||
"__id__": 54
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2175,7 +2070,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 55
|
||||
"__id__": 52
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2220,17 +2115,17 @@
|
|||
"_name": "water3",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 59
|
||||
"__id__": 56
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 60
|
||||
"__id__": 57
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2284,7 +2179,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 58
|
||||
"__id__": 55
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2329,7 +2224,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2360,7 +2255,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 50
|
||||
"__id__": 47
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2382,7 +2277,7 @@
|
|||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_fillRange": 1,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
|
@ -2411,11 +2306,11 @@
|
|||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 66
|
||||
"__id__": 63
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 67
|
||||
"__id__": 64
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2469,7 +2364,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 65
|
||||
"__id__": 62
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2507,6 +2402,113 @@
|
|||
"fileId": "b2Xfw7RPZMhrj9rvQnCwPq",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Xi_Soil",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 66
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 67
|
||||
},
|
||||
"_opacity": 0,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 65
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c1rnBrwplFLLvmPviKv2Ng",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "sp",
|
||||
|
@ -2621,7 +2623,7 @@
|
|||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
-72,
|
||||
-24.891,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -2730,7 +2732,7 @@
|
|||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
-72,
|
||||
20,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
|
BIN
assets/res/btn.png
Normal file
After Width: | Height: | Size: 20 KiB |
38
assets/res/btn.png.meta
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "af424dfb-ef89-4f3e-b330-84d64db660ff",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 269,
|
||||
"height": 74,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"btn": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "1b982a20-7926-44fc-80aa-d96fa01d06ae",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "af424dfb-ef89-4f3e-b330-84d64db660ff",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 269,
|
||||
"height": 74,
|
||||
"rawWidth": 269,
|
||||
"rawHeight": 74,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -179,11 +179,14 @@
|
|||
}
|
||||
}
|
||||
function setId(name){
|
||||
var urlNow = window.location.href;
|
||||
let userId = getUserId();
|
||||
if(userId == null){
|
||||
console.log("链接没ID准备跳转");
|
||||
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
window.location.href = url;
|
||||
if(!containsTrain(urlNow)){
|
||||
console.log("链接没ID准备跳转");
|
||||
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log("链接有ID",userId);
|
||||
|
@ -214,20 +217,18 @@
|
|||
}
|
||||
|
||||
function getUserId() {
|
||||
let pathStr = window.location.search;
|
||||
let arr=pathStr.split("&");
|
||||
if (pathStr.length>= 0&&arr.length>0) {
|
||||
let arr2=[];
|
||||
arr.map(item=>{
|
||||
arr2.push(item.split("=")[1])
|
||||
})
|
||||
window.userId = arr2[0] + "";
|
||||
return arr2[0]
|
||||
} else {
|
||||
return null
|
||||
var name = "userId";
|
||||
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) {
|
||||
return unescape(r[2]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function containsTrain(str) {
|
||||
return /from=train/i.test(str);
|
||||
}
|
||||
|
||||
loadScript(debug ? 'cocos2d-js.js' : 'cocos2d-js-min.js', function () {
|
||||
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{"paths":{},"types":[],"uuids":["29FYIk+N1GYaeWH/q1NxQO","2dL3kvpAxJu6GJ7RdqJG5J","2fyp3mEEVIdbl+app823Pa","4bnFp+xkVIpJrKXfOBzk71","4er1GLNexCYpKNTUl8Pygw","61cyPdEfRN047sDK9rO0W5","71VhFCTINJM6/Ky3oX9nBT","9cCAYtTPFLbqi6SjiBzH59","9cGJu2Po1E0Ig5JOShYLbd","a2MjXRFdtLlYQ5ouAFv/+R","b4P/PCArtIdIH38t6mlw8Y","d608qFRoFHwbXd0Dap056i","d8HsitJHxOYqo801xBk8ev","e8Ueib+qJEhL6mXAHdnwbi","e97GVMl6JHh5Ml5qEDdSGa","f0BIwQ8D5Ml7nTNQbh1YlS","02delMVqdBD70a/HSD99FK","02+qdP/LNMYprXxb2rzSoK","038X5XEVhLvKkpcE4sjxvI","08nl3uyqJJA7uoE3GvzFXX","09bYkL1mtAM5O2O8+V7qHc","0dYUDhpatFq6MgzYbrj9Ao","12h4oyoGNCtLIznkGQVMCE","13N/YjxRlBvJuJQONzZgQf","15Px8zkb9PNqM/8EKhh8Au","1dNha+sbhOcIXHxXv/DvKd","35noyLK/VOjrkOp2VPgfL5","3d1+VYOqRFMru62rlaVFw5","47ZX8FJD5PKqMtIAYx8cJS","5cO7kybDxGj4ipyMYdRYZB","5c+BT+UBxHhrClg8pgvwdu","5fDWUEFjZBRI2eMjZLlvjR","5f5dyqtRNNxaFmVzYns6FZ","61voSiLytCdKbvQdUslVWv","67jm/DIIFDxIZZJwIYExU4","72w0D96+tCzqgcxJNILv57","73N8EX9n1McabSpjwsAUFl","735++tg/NFuq8LAKT3Dq0y","75rGnU/uhK8bMsTI+rC297","76pgt/TFZD470MIGj+PmEU","7akOdsN/hPjITp8Fs0r+SB","84TEhnwUZPfYYtQ7rcSIdl","86RTsIyV1N174519l+P5Pb","8d6VAk+VtOSYLmKMYTu7Gp","906d84Zp1AyY2/IlNF6g7B","93rh8qRmZNwqSgRWn/HV4y","94fy1KWrtGzauS1WYYJj5t","95F5lEPqJBRb7AzhyuehSX","950i/nfQFMA706M0J42z2S","98MGN85ONN9Y1R/Em31xW0","9aAAqt7OBB9JisjAQY9UAn","9ajTxyRMRHBaydTBGlDSk1","9bvaMerUlDyary99mJa6xp","9ekcNRvRdEa7dzO3Ff5rpI","9fAapsHpVHi71EfwJl8ns5","a370KkqyVJLbbINtFmyZoV","a39q6sihlPfb0M5TnFO2VM","a8Z+I8DLJOTItWbXZ7o+On","ab1P7uwLFP0LwHkn9ME+r+","b2Jo5hfNdP3IxDaDbBBpRD","b3zo/554xPt4CdlPazRDpG","b67eQ8r1FMH4Sc4NPX9Pm9","b7ZgPiwWZM6a83QXze3eEu","b8DySHAFpJKL3lBPpBrtpx","b9JgB6PD5JgbHAY4hk38iS","bcEK9sCkJI4p6KlRiOXup5","bew0UnUvBFRbiViMzq4tm1","c0HHeDVMpCarROFz9NuoqK","c2TGyr0HlFNI+U5EHVCc9G","c4hq8w+RNMJYisEFc7WjmI","c5bTdQ6p5KJY7kyiMGyG9+","c9MNZOJwdHT7aRYiDiky3d","caMzEruwxDTbLoqA7DEd3/","cd0Te7CUhF2IPZcu9Ump28","cfqcs4X2pESrBI8GS67vAW","d1VSe4M39DrLKWwnZb3BZL","d5BkUa/nxBx5+b0q2RfGhs","d5OjVl+DNCYZB21IIypRPF","dbBrjVZzVM4IdI7f4G6f0w","ddqDlhAkZLWIL1y8avBH5u","e0b3wP+fNDrJPw/uXtbPAm","e4mOksb1lGdYpf3qDPlJ1m","e8GI4uyrpF67GYzhTP5An/","ecpdLyjvZBwrvm+cedCcQy","ed15lxBRBEnpnPnF2neaVF","ed8zUHEbVGj5LsmjJJ84R5","f0l6cmN0VCqJo0uIRJdK4X","f2XLSzyLBDmY65+MMcVh/R","f7bzZZX0lHQ4pY2wrfzNRV","fbFdFD+0hProkh5fAFST+s","fcnzeeqxVHkq3OZWAMR5PH","ffqy1jFwBIIY2Vn01HF6ob"],"scenes":{"db://assets/Scene/GameScene.fire":4,"db://assets/Scene/LoadScene.fire":7,"db://assets/Scene/OverScene.fire":3,"db://assets/Scene/RankScene.fire":1},"redirect":[16,0,17,1,18,1,19,1,20,1,21,1,22,1,23,1,24,1,26,1,27,1,30,1,31,1,33,1,34,1,35,1,36,1,37,1,38,1,39,1,41,1,42,1,43,1,44,1,45,1,46,1,47,1,48,1,49,1,50,1,51,1,54,1,56,1,57,1,58,1,59,1,60,1,61,1,62,1,63,1,64,1,65,1,66,1,67,1,68,1,69,1,70,1,72,1,73,1,74,1,75,1,76,1,77,1,78,1,79,1,80,1,81,1,82,1,83,0,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1],"deps":["internal","resources"],"packs":{"02989e146":[0,7,14,15],"05f26e7ec":[2,5,6,8,10,11,12,13],"074944b20":[25,1,29,32,52],"0d9744cd3":[0,28,4,40,53,9,55,71,14,15],"0f2adc401":[3,9]},"name":"main","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["02989e146","571a0","05f26e7ec","fc990","074944b20","3f156","0d9744cd3","fe13e","0f2adc401","653a1"],"native":[2,"6e8cb",5,"6d707",6,"c06a9",8,"3814e",10,"83fcc",11,"d55c2",12,"cdbc9",13,"90cf4"]}}
|
1
build/WaterControl/assets/main/config.cc0e7.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"paths":{},"types":[],"uuids":["29FYIk+N1GYaeWH/q1NxQO","2dL3kvpAxJu6GJ7RdqJG5J","2fyp3mEEVIdbl+app823Pa","4bnFp+xkVIpJrKXfOBzk71","4er1GLNexCYpKNTUl8Pygw","61cyPdEfRN047sDK9rO0W5","71VhFCTINJM6/Ky3oX9nBT","9cCAYtTPFLbqi6SjiBzH59","9cGJu2Po1E0Ig5JOShYLbd","a2MjXRFdtLlYQ5ouAFv/+R","afQk3774lPPrMwhNZNtmD/","b4P/PCArtIdIH38t6mlw8Y","d608qFRoFHwbXd0Dap056i","d8HsitJHxOYqo801xBk8ev","e8Ueib+qJEhL6mXAHdnwbi","e97GVMl6JHh5Ml5qEDdSGa","f0BIwQ8D5Ml7nTNQbh1YlS","02delMVqdBD70a/HSD99FK","02+qdP/LNMYprXxb2rzSoK","038X5XEVhLvKkpcE4sjxvI","08nl3uyqJJA7uoE3GvzFXX","09bYkL1mtAM5O2O8+V7qHc","0dYUDhpatFq6MgzYbrj9Ao","12h4oyoGNCtLIznkGQVMCE","13N/YjxRlBvJuJQONzZgQf","15Px8zkb9PNqM/8EKhh8Au","1bmCogeSZE/ICq2W+gHQau","1dNha+sbhOcIXHxXv/DvKd","35noyLK/VOjrkOp2VPgfL5","3d1+VYOqRFMru62rlaVFw5","47ZX8FJD5PKqMtIAYx8cJS","5cO7kybDxGj4ipyMYdRYZB","5c+BT+UBxHhrClg8pgvwdu","5fDWUEFjZBRI2eMjZLlvjR","5f5dyqtRNNxaFmVzYns6FZ","61voSiLytCdKbvQdUslVWv","67jm/DIIFDxIZZJwIYExU4","72w0D96+tCzqgcxJNILv57","73N8EX9n1McabSpjwsAUFl","735++tg/NFuq8LAKT3Dq0y","75rGnU/uhK8bMsTI+rC297","76pgt/TFZD470MIGj+PmEU","7akOdsN/hPjITp8Fs0r+SB","84TEhnwUZPfYYtQ7rcSIdl","86RTsIyV1N174519l+P5Pb","8d6VAk+VtOSYLmKMYTu7Gp","906d84Zp1AyY2/IlNF6g7B","93rh8qRmZNwqSgRWn/HV4y","94fy1KWrtGzauS1WYYJj5t","95F5lEPqJBRb7AzhyuehSX","950i/nfQFMA706M0J42z2S","98MGN85ONN9Y1R/Em31xW0","9aAAqt7OBB9JisjAQY9UAn","9ajTxyRMRHBaydTBGlDSk1","9bvaMerUlDyary99mJa6xp","9ekcNRvRdEa7dzO3Ff5rpI","9fAapsHpVHi71EfwJl8ns5","a370KkqyVJLbbINtFmyZoV","a39q6sihlPfb0M5TnFO2VM","a8Z+I8DLJOTItWbXZ7o+On","ab1P7uwLFP0LwHkn9ME+r+","b2Jo5hfNdP3IxDaDbBBpRD","b3zo/554xPt4CdlPazRDpG","b67eQ8r1FMH4Sc4NPX9Pm9","b7ZgPiwWZM6a83QXze3eEu","b8DySHAFpJKL3lBPpBrtpx","b9JgB6PD5JgbHAY4hk38iS","bcEK9sCkJI4p6KlRiOXup5","bew0UnUvBFRbiViMzq4tm1","c0HHeDVMpCarROFz9NuoqK","c2TGyr0HlFNI+U5EHVCc9G","c4hq8w+RNMJYisEFc7WjmI","c5bTdQ6p5KJY7kyiMGyG9+","c9MNZOJwdHT7aRYiDiky3d","caMzEruwxDTbLoqA7DEd3/","cd0Te7CUhF2IPZcu9Ump28","cfqcs4X2pESrBI8GS67vAW","d1VSe4M39DrLKWwnZb3BZL","d5BkUa/nxBx5+b0q2RfGhs","d5OjVl+DNCYZB21IIypRPF","dbBrjVZzVM4IdI7f4G6f0w","ddqDlhAkZLWIL1y8avBH5u","e0b3wP+fNDrJPw/uXtbPAm","e4mOksb1lGdYpf3qDPlJ1m","e8GI4uyrpF67GYzhTP5An/","ecpdLyjvZBwrvm+cedCcQy","ed15lxBRBEnpnPnF2neaVF","ed8zUHEbVGj5LsmjJJ84R5","f0l6cmN0VCqJo0uIRJdK4X","f2XLSzyLBDmY65+MMcVh/R","f7bzZZX0lHQ4pY2wrfzNRV","fbFdFD+0hProkh5fAFST+s","fcnzeeqxVHkq3OZWAMR5PH","ffqy1jFwBIIY2Vn01HF6ob"],"scenes":{"db://assets/Scene/GameScene.fire":4,"db://assets/Scene/LoadScene.fire":7,"db://assets/Scene/OverScene.fire":3,"db://assets/Scene/RankScene.fire":1},"redirect":[17,0,18,1,19,1,20,1,21,1,22,1,23,1,24,1,25,1,28,1,29,1,32,1,33,1,35,1,36,1,37,1,38,1,39,1,40,1,41,1,43,1,44,1,45,1,46,1,47,1,48,1,49,1,50,1,51,1,52,1,53,1,56,1,58,1,59,1,60,1,61,1,62,1,63,1,64,1,65,1,66,1,67,1,68,1,69,1,70,1,71,1,72,1,74,1,75,1,76,1,77,1,78,1,79,1,80,1,81,1,82,1,83,1,84,1,85,0,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1],"deps":["internal","resources"],"packs":{"02989e146":[0,7,15,16],"074944b20":[27,1,31,34,54],"0961e988d":[26,3,9],"09f72cf20":[2,5,6,8,10,11,12,13,14],"0d9744cd3":[0,30,4,42,55,9,57,73,15,16]},"name":"main","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["02989e146","19252","074944b20","3f156","0961e988d","85980","09f72cf20","e3c82","0d9744cd3","310b1"],"native":[2,"6e8cb",5,"6d707",6,"c06a9",8,"3814e",10,"65542",11,"83fcc",12,"d55c2",13,"cdbc9",14,"90cf4"]}}
|
|
@ -1 +1 @@
|
|||
[1,["ecpdLyjvZBwrvm+cedCcQy","f0BIwQ8D5Ml7nTNQbh1YlS","e97GVMl6JHh5Ml5qEDdSGa","29FYIk+N1GYaeWH/q1NxQO","71VhFCTINJM6/Ky3oX9nBT","c4hq8w+RNMJYisEFc7WjmI","9ajTxyRMRHBaydTBGlDSk1","735++tg/NFuq8LAKT3Dq0y","bew0UnUvBFRbiViMzq4tm1","95F5lEPqJBRb7AzhyuehSX","038X5XEVhLvKkpcE4sjxvI","94fy1KWrtGzauS1WYYJj5t","cd0Te7CUhF2IPZcu9Ump28","35noyLK/VOjrkOp2VPgfL5","b67eQ8r1FMH4Sc4NPX9Pm9","b4P/PCArtIdIH38t6mlw8Y","e8Ueib+qJEhL6mXAHdnwbi"],["node","_textureSetter","_spriteFrame","_parent","_N$pressedSprite","_N$hoverSprite","_N$disabledSprite","testVersion","_N$target","scene","chehui","jineng","qingkong","fangxiang","build","win","lose","_N$normalSprite"],[["cc.Node",["_name","_id","_objFlags","_components","_contentSize","_trs","_parent","_children","_color"],0,9,5,7,1,2,5],["cc.Widget",["_alignFlags","alignMode","_right","_bottom","_originalWidth","_originalHeight","_left","_top","node"],-5,1],"cc.SpriteFrame",["cc.Button",["_N$transition","zoomScale","node","clickEvents","_N$normalColor","_N$pressedColor","_N$disabledColor","_N$target","_N$pressedSprite","_N$hoverSprite","_N$disabledSprite","_N$normalSprite"],1,1,9,5,5,5,1,6,6,6,6],["cc.Sprite",["_type","node","_materials","_spriteFrame"],2,1,3,6],["cc.SceneAsset",["_name","asyncLoadAssets"],1],["cc.Node",["_name","_parent","_components","_contentSize","_trs"],2,1,12,5,7],["cc.Canvas",["_fitWidth","_fitHeight","node","_designResolution"],1,1,5],["454adgphRpA6oq5lB6Cg1fK",["clientTestVersion","node","testVersion"],2,1,1],["cc.ClickEvent",["_componentId","handler","target"],1,1],["cc.Scene",["_name","_active","autoReleaseAssets","_children","_anchorPoint","_trs"],0,2,5,7],["cc.Camera",["_clearFlags","_depth","node"],1,1],["5c9b8FZiaNLMrMDs9T3rByf",["node"],3,1],["cc.Label",["_string","_fontSize","_lineHeight","_N$horizontalAlign","_N$verticalAlign","node","_materials"],-2,1,3],["58403/n16JCa5sZhNMjZzGo",["node","chehui","jineng","qingkong","fangxiang","build","win","lose"],3,1,6,6,6,6,6,6,6]],[[0,0,6,3,4,5,2],[13,0,1,2,3,4,5,6,6],[1,0,2,3,8,4],[9,0,1,2,3],[4,0,1,2,3,2],[5,0,1,3],[0,0,1,7,3,4,5,3],[0,0,6,7,3,8,4,5,2],[0,0,2,3,4,5,3],[0,0,6,3,4,2],[0,0,6,7,3,4,5,2],[0,0,1,6,3,3],[6,0,1,2,3,4,2],[7,0,1,2,3,3],[1,0,8,2],[1,1,0,6,2,7,3,4,5,8,9],[1,1,0,4,5,8,5],[8,0,1,2,2],[3,1,0,2,3,4,5,6,7,8,9,10,3],[3,0,2,3,4,5,6,7,11,8,9,10,2],[4,1,2,3,1],[10,0,1,2,3,4,5,4],[11,0,1,2,3],[12,0,1],[14,0,1,2,3,4,5,6,7,1]],[[[{"name":"default_btn_disabled","rect":[0,0,40,40],"offset":[0,0],"originalSize":[40,40],"capInsets":[12,12,12,12]}],[2],0,[0],[1],[4]],[[[5,"LoadScene",null],[6,"Canvas","a5esZu+45LA5mBpvttspPD",[-5,-6,-7,-8,-9,-10],[[13,true,false,-1,[5,750,1334]],[14,45,-2],[17,"1.1.5",-4,-3]],[5,750,1334],[375,667,0,0,0,0,1,1,1,1]],[7,"Rank",1,[-13,-14],[[18,1.1,3,-12,[[3,"454adgphRpA6oq5lB6Cg1fK","openRank",1]],[4,4293322470],[4,4291348680],[4,3363338360],-11,12,13,14]],[4,4278190314],[5,100,40],[258.955,-476.544,0,0,0,0,1,1,1,1]],[0,"Background",2,[[4,1,-15,[9],10],[15,0,45,-1,-1,-31,-31,100,40,-16]],[5,102,102],[0,0,0,0,0,0,1,1,1,0]],[8,"Background",512,[[4,1,-17,[17],18],[16,0,45,100,40,-18]],[5,513,137],[0,0,0,0,0,0,1,1,1,0]],[21,"New Node",false,true,[-19,1],[0,0,0],[0,0,0,0,0,0,1,1,1,1]],[9,"Main Camera",1,[[22,7,-1,-20],[23,-21]],[5,960,640]],[12,"New Label",1,[[-22,[2,36,4.176999999999964,1.3799999999999955,-23]],1,4],[5,66.72,37.8],[337.463,-646.72,0,0,0,0,1,1,1,1]],[0,"version",1,[[1,"版本号:",30,30,1,1,-24,[16]],[2,36,74.243,2.282000000000039,-25]],[5,98.33,37.8],[251.592,-645.818,0,0,0,0,1,1,1,1]],[10,"New Button",1,[4],[[19,3,-26,[[3,"454adgphRpA6oq5lB6Cg1fK","startGame",1]],[4,4293322470],[4,4291348680],[4,3363338360],4,19,20,21,22]],[5,513,137],[0,-313.512,0,0,0,0,1,1,1,1]],[11,"GameData","2dMM3dYbVDG6vnNZZa8IqA",5,[[24,-27,0,1,2,3,4,5,6]]],[0,"New Sprite",1,[[20,-28,[7],8]],[5,750,1660],[0,0,0,0,0,0,1,1,1,0]],[0,"New Label",2,[[1,"排 行",23,23,1,1,-29,[11]]],[5,52.39,28.98],[0.402,-49.341,0,0,0,0,1,1,1,1]],[1,"0.0.0",30,30,1,1,7,[15]]],0,[0,0,1,0,0,1,0,7,13,0,0,1,0,-1,6,0,-2,11,0,-3,2,0,-4,7,0,-5,8,0,-6,9,0,8,3,0,0,2,0,-1,3,0,-2,12,0,0,3,0,0,3,0,0,4,0,0,4,0,-1,10,0,0,6,0,0,6,0,-1,13,0,0,7,0,0,8,0,0,8,0,0,9,0,0,10,0,0,11,0,0,12,0,9,5,1,3,5,4,3,9,29],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[10,11,12,13,14,15,16,-1,2,-1,2,-1,4,5,6,-1,-1,-1,2,17,4,5,6],[5,6,7,8,9,10,11,0,12,0,13,0,2,1,3,0,0,0,14,1,2,1,3]],[[{"name":"default_btn_pressed","rect":[0,0,40,40],"offset":[0,0],"originalSize":[40,40],"capInsets":[12,12,12,12]}],[2],0,[0],[1],[15]],[[{"name":"default_btn_normal","rect":[0,0,40,40],"offset":[0,0],"originalSize":[40,40],"capInsets":[12,12,12,12]}],[2],0,[0],[1],[16]]]]
|
||||
[1,["ecpdLyjvZBwrvm+cedCcQy","f0BIwQ8D5Ml7nTNQbh1YlS","e97GVMl6JHh5Ml5qEDdSGa","29FYIk+N1GYaeWH/q1NxQO","71VhFCTINJM6/Ky3oX9nBT","c4hq8w+RNMJYisEFc7WjmI","9ajTxyRMRHBaydTBGlDSk1","735++tg/NFuq8LAKT3Dq0y","bew0UnUvBFRbiViMzq4tm1","95F5lEPqJBRb7AzhyuehSX","038X5XEVhLvKkpcE4sjxvI","94fy1KWrtGzauS1WYYJj5t","cd0Te7CUhF2IPZcu9Ump28","35noyLK/VOjrkOp2VPgfL5","b67eQ8r1FMH4Sc4NPX9Pm9","b4P/PCArtIdIH38t6mlw8Y","e8Ueib+qJEhL6mXAHdnwbi"],["node","_textureSetter","_spriteFrame","_parent","_N$pressedSprite","_N$hoverSprite","_N$disabledSprite","testVersion","_N$target","scene","chehui","jineng","qingkong","fangxiang","build","win","lose","_N$normalSprite"],[["cc.Node",["_name","_id","_objFlags","_components","_contentSize","_trs","_parent","_children","_color"],0,9,5,7,1,2,5],["cc.Widget",["_alignFlags","alignMode","_right","_bottom","_originalWidth","_originalHeight","_left","_top","node"],-5,1],"cc.SpriteFrame",["cc.Button",["_N$transition","zoomScale","node","clickEvents","_N$normalColor","_N$pressedColor","_N$disabledColor","_N$target","_N$pressedSprite","_N$hoverSprite","_N$disabledSprite","_N$normalSprite"],1,1,9,5,5,5,1,6,6,6,6],["cc.Sprite",["_type","node","_materials","_spriteFrame"],2,1,3,6],["cc.SceneAsset",["_name","asyncLoadAssets"],1],["cc.Node",["_name","_parent","_components","_contentSize","_trs"],2,1,12,5,7],["cc.Canvas",["_fitWidth","_fitHeight","node","_designResolution"],1,1,5],["454adgphRpA6oq5lB6Cg1fK",["clientTestVersion","node","testVersion"],2,1,1],["cc.ClickEvent",["_componentId","handler","target"],1,1],["cc.Scene",["_name","_active","autoReleaseAssets","_children","_anchorPoint","_trs"],0,2,5,7],["cc.Camera",["_clearFlags","_depth","node"],1,1],["5c9b8FZiaNLMrMDs9T3rByf",["node"],3,1],["cc.Label",["_string","_fontSize","_lineHeight","_N$horizontalAlign","_N$verticalAlign","node","_materials"],-2,1,3],["58403/n16JCa5sZhNMjZzGo",["node","chehui","jineng","qingkong","fangxiang","build","win","lose"],3,1,6,6,6,6,6,6,6]],[[0,0,6,3,4,5,2],[13,0,1,2,3,4,5,6,6],[1,0,2,3,8,4],[9,0,1,2,3],[4,0,1,2,3,2],[5,0,1,3],[0,0,1,7,3,4,5,3],[0,0,6,7,3,8,4,5,2],[0,0,2,3,4,5,3],[0,0,6,3,4,2],[0,0,6,7,3,4,5,2],[0,0,1,6,3,3],[6,0,1,2,3,4,2],[7,0,1,2,3,3],[1,0,8,2],[1,1,0,6,2,7,3,4,5,8,9],[1,1,0,4,5,8,5],[8,0,1,2,2],[3,1,0,2,3,4,5,6,7,8,9,10,3],[3,0,2,3,4,5,6,7,11,8,9,10,2],[4,1,2,3,1],[10,0,1,2,3,4,5,4],[11,0,1,2,3],[12,0,1],[14,0,1,2,3,4,5,6,7,1]],[[[{"name":"default_btn_disabled","rect":[0,0,40,40],"offset":[0,0],"originalSize":[40,40],"capInsets":[12,12,12,12]}],[2],0,[0],[1],[4]],[[[5,"LoadScene",null],[6,"Canvas","a5esZu+45LA5mBpvttspPD",[-5,-6,-7,-8,-9,-10],[[13,true,false,-1,[5,750,1334]],[14,45,-2],[17,"1.2.9",-4,-3]],[5,750,1334],[375,667,0,0,0,0,1,1,1,1]],[7,"Rank",1,[-13,-14],[[18,1.1,3,-12,[[3,"454adgphRpA6oq5lB6Cg1fK","openRank",1]],[4,4293322470],[4,4291348680],[4,3363338360],-11,12,13,14]],[4,4278190314],[5,100,40],[258.955,-476.544,0,0,0,0,1,1,1,1]],[0,"Background",2,[[4,1,-15,[9],10],[15,0,45,-1,-1,-31,-31,100,40,-16]],[5,102,102],[0,0,0,0,0,0,1,1,1,0]],[8,"Background",512,[[4,1,-17,[17],18],[16,0,45,100,40,-18]],[5,513,137],[0,0,0,0,0,0,1,1,1,0]],[21,"New Node",false,true,[-19,1],[0,0,0],[0,0,0,0,0,0,1,1,1,1]],[9,"Main Camera",1,[[22,7,-1,-20],[23,-21]],[5,960,640]],[12,"New Label",1,[[-22,[2,36,4.176999999999964,1.3799999999999955,-23]],1,4],[5,66.72,37.8],[337.463,-646.72,0,0,0,0,1,1,1,1]],[0,"version",1,[[1,"版本号:",30,30,1,1,-24,[16]],[2,36,74.243,2.282000000000039,-25]],[5,98.33,37.8],[251.592,-645.818,0,0,0,0,1,1,1,1]],[10,"New Button",1,[4],[[19,3,-26,[[3,"454adgphRpA6oq5lB6Cg1fK","startGame",1]],[4,4293322470],[4,4291348680],[4,3363338360],4,19,20,21,22]],[5,513,137],[0,-313.512,0,0,0,0,1,1,1,1]],[11,"GameData","2dMM3dYbVDG6vnNZZa8IqA",5,[[24,-27,0,1,2,3,4,5,6]]],[0,"New Sprite",1,[[20,-28,[7],8]],[5,750,1660],[0,0,0,0,0,0,1,1,1,0]],[0,"New Label",2,[[1,"排 行",23,23,1,1,-29,[11]]],[5,52.39,28.98],[0.402,-49.341,0,0,0,0,1,1,1,1]],[1,"0.0.0",30,30,1,1,7,[15]]],0,[0,0,1,0,0,1,0,7,13,0,0,1,0,-1,6,0,-2,11,0,-3,2,0,-4,7,0,-5,8,0,-6,9,0,8,3,0,0,2,0,-1,3,0,-2,12,0,0,3,0,0,3,0,0,4,0,0,4,0,-1,10,0,0,6,0,0,6,0,-1,13,0,0,7,0,0,8,0,0,8,0,0,9,0,0,10,0,0,11,0,0,12,0,9,5,1,3,5,4,3,9,29],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[10,11,12,13,14,15,16,-1,2,-1,2,-1,4,5,6,-1,-1,-1,2,17,4,5,6],[5,6,7,8,9,10,11,0,12,0,13,0,2,1,3,0,0,0,14,1,2,1,3]],[[{"name":"default_btn_pressed","rect":[0,0,40,40],"offset":[0,0],"originalSize":[40,40],"capInsets":[12,12,12,12]}],[2],0,[0],[1],[15]],[[{"name":"default_btn_normal","rect":[0,0,40,40],"offset":[0,0],"originalSize":[40,40],"capInsets":[12,12,12,12]}],[2],0,[0],[1],[16]]]]
|
|
@ -1 +1 @@
|
|||
{"type":"cc.Texture2D","data":"0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"}
|
||||
{"type":"cc.Texture2D","data":"0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"}
|
1
build/WaterControl/assets/main/index.cc0e7.js
Normal file
After Width: | Height: | Size: 20 KiB |
|
@ -137,9 +137,9 @@
|
|||
</div>
|
||||
|
||||
<canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
|
||||
<script src="src/settings.2e112.js" charset="utf-8"></script>
|
||||
<script src="src/settings.55f02.js" charset="utf-8"></script>
|
||||
|
||||
<script src="main.456ac.js" charset="utf-8"></script>
|
||||
<script src="main.72cc0.js" charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
||||
|
||||
|
@ -179,11 +179,14 @@
|
|||
}
|
||||
}
|
||||
function setId(name){
|
||||
var urlNow = window.location.href;
|
||||
let userId = getUserId();
|
||||
if(userId == null){
|
||||
console.log("链接没ID准备跳转");
|
||||
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
window.location.href = url;
|
||||
if(!containsTrain(urlNow)){
|
||||
console.log("链接没ID准备跳转");
|
||||
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log("链接有ID",userId);
|
||||
|
@ -214,20 +217,18 @@
|
|||
}
|
||||
|
||||
function getUserId() {
|
||||
let pathStr = window.location.search;
|
||||
let arr=pathStr.split("&");
|
||||
if (pathStr.length>= 0&&arr.length>0) {
|
||||
let arr2=[];
|
||||
arr.map(item=>{
|
||||
arr2.push(item.split("=")[1])
|
||||
})
|
||||
window.userId = arr2[0] + "";
|
||||
return arr2[0]
|
||||
} else {
|
||||
return null
|
||||
var name = "userId";
|
||||
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) {
|
||||
return unescape(r[2]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function containsTrain(str) {
|
||||
return /from=train/i.test(str);
|
||||
}
|
||||
|
||||
loadScript(debug ? 'cocos2d-js.js' : 'cocos2d-js-min.98a65.js', function () {
|
||||
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
|
||||
|
|
|
@ -117,7 +117,7 @@ window.boot = function () {
|
|||
if (window.jsb) {
|
||||
var isRuntime = (typeof loadRuntime === 'function');
|
||||
if (isRuntime) {
|
||||
require('src/settings.2e112.js');
|
||||
require('src/settings.55f02.js');
|
||||
require('src/cocos2d-runtime.js');
|
||||
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
|
||||
require('src/physics.js');
|
||||
|
@ -125,7 +125,7 @@ if (window.jsb) {
|
|||
require('jsb-adapter/engine/index.js');
|
||||
}
|
||||
else {
|
||||
require('src/settings.2e112.js');
|
||||
require('src/settings.55f02.js');
|
||||
require('src/cocos2d-jsb.js');
|
||||
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
|
||||
require('src/physics.js');
|
|
@ -1 +1 @@
|
|||
window._CCSettings={platform:"web-mobile",groupList:["default"],collisionMatrix:[[true]],hasResourcesBundle:true,hasStartSceneBundle:false,remoteBundles:[],subpackages:[],launchScene:"db://assets/Scene/LoadScene.fire",orientation:"",jsList:[],bundleVers:{internal:"d0832",resources:"c4a64",main:"a3c5f"}};
|
||||
window._CCSettings={platform:"web-mobile",groupList:["default"],collisionMatrix:[[true]],hasResourcesBundle:true,hasStartSceneBundle:false,remoteBundles:[],subpackages:[],launchScene:"db://assets/Scene/LoadScene.fire",orientation:"",jsList:[],bundleVers:{internal:"d0832",resources:"c4a64",main:"cc0e7"}};
|
28
library/imports/1b/1b982a20-7926-44fc-80aa-d96fa01d06ae.json
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"__type__": "cc.SpriteFrame",
|
||||
"content": {
|
||||
"name": "btn",
|
||||
"texture": "af424dfb-ef89-4f3e-b330-84d64db660ff",
|
||||
"atlas": "",
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
269,
|
||||
74
|
||||
],
|
||||
"offset": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"originalSize": [
|
||||
269,
|
||||
74
|
||||
],
|
||||
"capInsets": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
|
@ -15,14 +15,20 @@ var GameTool = {
|
|||
var name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
|
||||
var data = JSON.parse(localStorage.getItem(name));
|
||||
if (data == "undifend" || data == null || data == "") {
|
||||
var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
|
||||
window.location.href = url;
|
||||
var urlNow = window.location.href;
|
||||
if (!this.containsTrain(urlNow)) {
|
||||
var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
else {
|
||||
cc.fx.StorageMessage.setStorage(name, data);
|
||||
cc.fx.GameConfig.GM_INFO.userId = parseInt(data.userId);
|
||||
}
|
||||
},
|
||||
containsTrain: function (str) {
|
||||
return /from=train/i.test(str);
|
||||
},
|
||||
//埋点上传
|
||||
setGameData: function () {
|
||||
//GAME_DATA 初始化 每次清零
|
||||
|
@ -37,7 +43,7 @@ var GameTool = {
|
|||
"matchId": matchId,
|
||||
"data": data
|
||||
};
|
||||
console.log("上传数据:", data);
|
||||
// console.log("上传数据:",data);
|
||||
cc.fx.HttpUtil.uploadUserLogData(postData, function () { });
|
||||
},
|
||||
//上传排行榜 type为1
|
||||
|
|
|
@ -39,6 +39,18 @@ var NewClass = /** @class */ (function (_super) {
|
|||
cc.fx.GameConfig.init(this.localTest);
|
||||
// cc.fx.AudioManager.Instance.init();
|
||||
this.testVersion.string = this.clientTestVersion;
|
||||
var urlNow = window.location.href;
|
||||
if (this.containsTrain(urlNow)) {
|
||||
console.log("无排行版本");
|
||||
this.node.getChildByName("Rank").active = false;
|
||||
}
|
||||
else {
|
||||
console.log("有排行版本");
|
||||
}
|
||||
};
|
||||
//判断来源
|
||||
NewClass.prototype.containsTrain = function (str) {
|
||||
return /from=train/i.test(str);
|
||||
};
|
||||
//开始游戏,跳转至引导页面
|
||||
NewClass.prototype.startGame = function () {
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAwC,EAAE,CAAC,UAAU,EAApD,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAiB,CAAC;AAG5D;IAAsC,4BAAY;IAAlD;QAAA,qEAoCC;QAjCG,eAAS,GAAY,KAAK,CAAC;QAG3B,uBAAiB,GAAW,OAAO,CAAC;QAGpC,iBAAW,GAAa,IAAI,CAAC;;IA2BjC,CAAC;IAzBG,wBAAK,GAAL;QACI,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,sCAAsC;QACtC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACrD,CAAC;IAED,cAAc;IACd,4BAAS,GAAT;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnC,uCAAuC;IAC3C,CAAC;IACD,gBAAgB;IAChB,2BAAQ,GAAR,UAAS,KAAK,EAAC,IAAI;QACf,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjD,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IACD,OAAO;IACP,2BAAQ,GAAR;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAES,yBAAM,GAAhB,UAAiB,EAAU;IAC3B,CAAC;IAhCD;QADC,QAAQ,CAAC,KAAK,CAAC;+CACW;IAG3B;QADC,QAAQ,CAAC,EAAE,CAAC;uDACuB;IAGpC;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;iDACU;IATZ,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAoC5B;IAAD,eAAC;CApCD,AAoCC,CApCqC,EAAE,CAAC,SAAS,GAoCjD;kBApCoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property, requireComponent} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(false)\r\n localTest: boolean = false;\r\n\r\n @property(\"\")\r\n clientTestVersion: string = \"1.0.0\";\r\n\r\n @property(cc.Label)\r\n testVersion: cc.Label = null;\r\n\r\n start () {\r\n cc.debug.setDisplayStats(false);\r\n window.initMgr();\r\n cc.fx.GameConfig.init(this.localTest);\r\n // cc.fx.AudioManager.Instance.init();\r\n this.testVersion.string = this.clientTestVersion;\r\n }\r\n\r\n //开始游戏,跳转至引导页面\r\n startGame(){\r\n cc.director.loadScene(\"GameScene\");\r\n // cc.director.loadScene(\"GuideScene\");\r\n }\r\n //备用,用来测试跳转 指定关卡\r\n clickBtn(event,data){\r\n cc.fx.GameConfig.GM_INFO.custom = parseInt(data);\r\n cc.director.loadScene(\"GameScene\");\r\n } \r\n //打开排行榜\r\n openRank(){\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n \r\n protected update(dt: number): void {\r\n }\r\n}\r\n"]}
|
||||
{"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAwC,EAAE,CAAC,UAAU,EAApD,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAiB,CAAC;AAG5D;IAAsC,4BAAY;IAAlD;QAAA,qEAiDC;QA9CG,eAAS,GAAY,KAAK,CAAC;QAG3B,uBAAiB,GAAW,OAAO,CAAC;QAGpC,iBAAW,GAAa,IAAI,CAAC;;IAwCjC,CAAC;IAtCG,wBAAK,GAAL;QACI,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,sCAAsC;QACtC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC;QACjD,IAAI,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAClC,IAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAC;YAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACrB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;SACnD;aACG;YACA,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SACxB;IACL,CAAC;IAED,MAAM;IACN,gCAAa,GAAb,UAAc,GAAG;QACb,OAAO,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IAED,cAAc;IACd,4BAAS,GAAT;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnC,uCAAuC;IAC3C,CAAC;IACD,gBAAgB;IAChB,2BAAQ,GAAR,UAAS,KAAK,EAAC,IAAI;QACf,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjD,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IACD,OAAO;IACP,2BAAQ,GAAR;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAES,yBAAM,GAAhB,UAAiB,EAAU;IAC3B,CAAC;IA7CD;QADC,QAAQ,CAAC,KAAK,CAAC;+CACW;IAG3B;QADC,QAAQ,CAAC,EAAE,CAAC;uDACuB;IAGpC;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;iDACU;IATZ,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAiD5B;IAAD,eAAC;CAjDD,AAiDC,CAjDqC,EAAE,CAAC,SAAS,GAiDjD;kBAjDoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property, requireComponent} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(false)\r\n localTest: boolean = false;\r\n\r\n @property(\"\")\r\n clientTestVersion: string = \"1.0.0\";\r\n\r\n @property(cc.Label)\r\n testVersion: cc.Label = null;\r\n\r\n start () {\r\n cc.debug.setDisplayStats(false);\r\n window.initMgr();\r\n cc.fx.GameConfig.init(this.localTest);\r\n // cc.fx.AudioManager.Instance.init();\r\n this.testVersion.string = this.clientTestVersion;\r\n var urlNow = window.location.href;\r\n if(this.containsTrain(urlNow)){\r\n console.log(\"无排行版本\");\r\n this.node.getChildByName(\"Rank\").active = false;\r\n }\r\n else{\r\n console.log(\"有排行版本\");\r\n }\r\n }\r\n\r\n //判断来源\r\n containsTrain(str) {\r\n return /from=train/i.test(str);\r\n }\r\n\r\n //开始游戏,跳转至引导页面\r\n startGame(){\r\n cc.director.loadScene(\"GameScene\");\r\n // cc.director.loadScene(\"GuideScene\");\r\n }\r\n //备用,用来测试跳转 指定关卡\r\n clickBtn(event,data){\r\n cc.fx.GameConfig.GM_INFO.custom = parseInt(data);\r\n cc.director.loadScene(\"GameScene\");\r\n } \r\n //打开排行榜\r\n openRank(){\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n \r\n protected update(dt: number): void {\r\n }\r\n}\r\n"]}
|
|
@ -64,6 +64,17 @@ var NewClass = /** @class */ (function (_super) {
|
|||
this.three.active = false;
|
||||
this.four.active = false;
|
||||
this.five.active = false;
|
||||
var urlNow = window.location.href;
|
||||
if (this.containsTrain(urlNow)) {
|
||||
this.node.getChildByName("again").active = false;
|
||||
this.node.getChildByName("back").active = false;
|
||||
this.node.getChildByName("finishi").active = true;
|
||||
}
|
||||
else {
|
||||
this.node.getChildByName("again").active = true;
|
||||
this.node.getChildByName("back").active = true;
|
||||
this.node.getChildByName("finishi").active = false;
|
||||
}
|
||||
this.getRank();
|
||||
};
|
||||
//打开排行榜
|
||||
|
@ -80,8 +91,13 @@ var NewClass = /** @class */ (function (_super) {
|
|||
cc.fx.GameConfig.GM_INFO.score = 0;
|
||||
cc.fx.GameConfig.GM_INFO.min_Steps = 0;
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = 0;
|
||||
cc.fx.GameConfig.TIME_INFO.totalTime = 120;
|
||||
cc.director.loadScene("GameScene");
|
||||
};
|
||||
//判断来源
|
||||
NewClass.prototype.containsTrain = function (str) {
|
||||
return /from=train/i.test(str);
|
||||
};
|
||||
//获取排行榜
|
||||
NewClass.prototype.getRank = function () {
|
||||
var _this = this;
|
||||
|
@ -91,6 +107,11 @@ var NewClass = /** @class */ (function (_super) {
|
|||
};
|
||||
cc.fx.GameTool.getRank(dataFile, function (data) { return _this.getRankData(data); });
|
||||
};
|
||||
//打开排行榜
|
||||
NewClass.prototype.jumpFinishi = function () {
|
||||
var url = "https://train.sparkus.cn/poster/game/";
|
||||
window.location.href = url;
|
||||
};
|
||||
//设置排行信息
|
||||
NewClass.prototype.getRankData = function (data) {
|
||||
if (data) {
|
||||
|
|
|
@ -1424,8 +1424,8 @@
|
|||
"__id__": 4
|
||||
},
|
||||
"_enabled": true,
|
||||
"localTest": true,
|
||||
"clientTestVersion": "1.1.5",
|
||||
"localTest": false,
|
||||
"clientTestVersion": "1.2.9",
|
||||
"testVersion": {
|
||||
"__id__": 19
|
||||
},
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"__type__": "cc.Texture2D",
|
||||
"content": "0,9729,9729,33071,33071,0,0,1"
|
||||
}
|
BIN
library/imports/af/af424dfb-ef89-4f3e-b330-84d64db660ff.png
Normal file
After Width: | Height: | Size: 20 KiB |
|
@ -46,14 +46,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
};
|
||||
//处理地图数据 第一关完全随机,从第二关开始,赢了根据5秒洪峰来临增加难度步数,输了当前难度减步数
|
||||
GameManager.prototype.getMap = function () {
|
||||
// var temp = [];
|
||||
// for(let k=0; k<cc.fx.GameConfig.LEVEL_INFO.length; k++){
|
||||
// temp[k] = [];
|
||||
// for(let j=0; j<cc.fx.GameConfig.LEVEL_INFO[k].length; j++){
|
||||
// temp[k].push(cc.fx.GameConfig.LEVEL_INFO[k][j].min_steps);
|
||||
// }
|
||||
// }
|
||||
// console.log(temp);
|
||||
var custom = 0;
|
||||
var map = [];
|
||||
if (cc.fx.GameConfig.GM_INFO.level == 1) {
|
||||
|
@ -72,14 +64,19 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
var random = Math.floor(Math.random() * map.length);
|
||||
custom = map[random];
|
||||
console.log(custom, map);
|
||||
// console.log(custom,map);
|
||||
}
|
||||
//记录当前最小步数
|
||||
cc.fx.GameConfig.GM_INFO.min_Steps = cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][custom].min_steps;
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = 0;
|
||||
return custom;
|
||||
};
|
||||
//获取下一关难度,步数增加2或者1,如果没有则降到有.
|
||||
/**
|
||||
* 获取下一关难度,步数增加2或者1,如果没有则降到有.
|
||||
* @param arr 配置里读取,当前(x*x)地图等级内所有地图数组
|
||||
* @param min_steps 最佳步数,下一关难度或者输了降难度,根据最佳步数增加或者减少。
|
||||
* @param type true为增加步数,false为输了降低难度步数
|
||||
*/
|
||||
GameManager.prototype.getMapArray = function (arr, min_steps, type) {
|
||||
var map = [];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
|
@ -112,6 +109,9 @@ var GameManager = /** @class */ (function (_super) {
|
|||
this.replaceTime = 0;
|
||||
this.startTime = cc.fx.GameTool.getTime();
|
||||
this.countTime = cc.fx.GameConfig.TIME_INFO.totalTime;
|
||||
if (this.countTime == 0) {
|
||||
this.gameOver();
|
||||
}
|
||||
this.waterTime = cc.fx.GameConfig.TIME_INFO.waterTime[cc.fx.GameConfig.GM_INFO.level];
|
||||
// if(this.countTime < this.waterTime) this.replaceTime = this.countTime;
|
||||
this.Time.string = cc.fx.GameTool.getTimeMargin(this.countTime);
|
||||
|
@ -155,13 +155,14 @@ var GameManager = /** @class */ (function (_super) {
|
|||
else if (!cc.fx.GameConfig.GM_INFO.guide) {
|
||||
this.custom = this.getMap();
|
||||
}
|
||||
console.log(this.custom);
|
||||
// this.custom = 7;
|
||||
// console.log(this.custom);
|
||||
var arr = cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][this.custom].map;
|
||||
if (cc.fx.GameConfig.GM_INFO.level == 0) {
|
||||
this.Map.scale = 1.2;
|
||||
}
|
||||
this.node.getChildByName("Top").getChildByName("id").getComponent(cc.Label).string =
|
||||
cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][this.custom].id;
|
||||
cc.fx.GameConfig.GM_INFO.score;
|
||||
//将地图x,y轴切换
|
||||
this.map_Array = arr[0].map(function (item, i) {
|
||||
return arr.map(function (val) { return val[i]; });
|
||||
|
@ -184,7 +185,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
}
|
||||
};
|
||||
//开始后,按玩家操作,将路径中地图块放入数组中
|
||||
/**
|
||||
* 开始后,按玩家操作,将路径中地图块放入数组中
|
||||
* @param data 根据当前操作,添加建筑地图数组
|
||||
*/
|
||||
GameManager.prototype.setMap = function (data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var start = this.path_Array[this.path_Array.length - 1];
|
||||
|
@ -214,7 +218,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
this.runRoad(0);
|
||||
};
|
||||
//开始执行洪峰来了的动画
|
||||
/**
|
||||
* 开始执行洪峰来了的动画
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
*/
|
||||
GameManager.prototype.runRoad = function (order) {
|
||||
var _this = this;
|
||||
order = parseInt(order);
|
||||
|
@ -246,7 +253,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
setTimeout(function () {
|
||||
if (!_this.plan_over) {
|
||||
_this.plan_over = true;
|
||||
_this.unschedule(_this.updateWaterTime);
|
||||
var head = _this.node.getChildByName("Top").getChildByName("head");
|
||||
var progress = _this.node.getChildByName("Top").getChildByName("progress").getComponent(cc.Sprite);
|
||||
head.stopAllActions();
|
||||
|
@ -261,7 +267,7 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
else {
|
||||
direction = "err";
|
||||
console.log("进入结束err");
|
||||
// console.log("进入结束err");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -274,7 +280,8 @@ var GameManager = /** @class */ (function (_super) {
|
|||
direction = "Xi_Soil";
|
||||
}
|
||||
else if (this.path_Array[order + 1].z == 6 && order == 0 && order + 1 < this.path_Array.length) {
|
||||
direction = this.getDirection(order + 1, this.path_Array);
|
||||
// direction = this.getDirection(order+1,this.path_Array);
|
||||
direction = this.getDirection(order, this.path_Array);
|
||||
}
|
||||
else {
|
||||
direction = this.getDirection(order, this.path_Array);
|
||||
|
@ -290,7 +297,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
// if(direction == "" || jg == false) return;
|
||||
if (direction == "err" || direction == "" || jg == false) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
return;
|
||||
}
|
||||
if (i < 0 || i > (this.block_Array.length - 1)) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
return;
|
||||
}
|
||||
var target = this.block_Array[i].getComponent("Block");
|
||||
|
@ -325,7 +335,14 @@ var GameManager = /** @class */ (function (_super) {
|
|||
target.runRoad(data);
|
||||
}
|
||||
};
|
||||
//判断边界。或者撞山,或者湿地没有加固
|
||||
/**
|
||||
* 判断边界。或者撞山,或者湿地没有加固
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param x 当前操作地块横坐标
|
||||
* @param y 当前操作地块纵坐标
|
||||
* @param direction 当前操作方向,若不是方向则为息壤或者加固
|
||||
* @param road 建筑地图数组,可理解为路径数组,path_Array
|
||||
*/
|
||||
GameManager.prototype.getBoundary = function (order, x, y, direction, road) {
|
||||
var jg = true;
|
||||
if (x < 0 || x >= this.map_Width || y < 0 || y >= this.map_Hight) {
|
||||
|
@ -333,7 +350,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
// console.log("超过边界,游戏结束");
|
||||
// alert("超过边界,治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
else {
|
||||
var i = road[order].x * this.map_Array[0].length + road[order].y;
|
||||
|
@ -343,19 +359,20 @@ var GameManager = /** @class */ (function (_super) {
|
|||
// console.log("修筑山峰,游戏结束");
|
||||
// alert("修筑山峰,治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
else if (target.block_Type == 2 && direction != "Reinforce") {
|
||||
jg = false;
|
||||
// console.log("修筑未加固湿地,游戏结束");
|
||||
// alert("修筑未加固湿地,游戏结束");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
}
|
||||
return jg;
|
||||
};
|
||||
//开始执行洪峰来了的动画
|
||||
/**
|
||||
* 开始执行洪峰来了的动画
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
*/
|
||||
GameManager.prototype.runWater = function (order) {
|
||||
order = parseInt(order);
|
||||
if (order <= this.water_Array.length - 1) {
|
||||
|
@ -390,7 +407,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var jg = this.getBoundary(order, this.water_Array[order].x, this.water_Array[order].y, direction, this.water_Array);
|
||||
if (direction == "" || jg == false || direction == "err") {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
return;
|
||||
}
|
||||
var target = this.block_Array[i].getComponent("Block");
|
||||
|
@ -425,7 +441,11 @@ var GameManager = /** @class */ (function (_super) {
|
|||
target.runWater(data);
|
||||
}
|
||||
};
|
||||
//获取息壤的格子的方向
|
||||
/**
|
||||
* 获取息壤的格子的方向
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
GameManager.prototype.getXi_Soil = function (order, road) {
|
||||
var direction = null;
|
||||
//如果息壤后面还有下一步的话
|
||||
|
@ -446,12 +466,18 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
return direction;
|
||||
};
|
||||
//设置息壤
|
||||
/**
|
||||
* 设置息壤执行方法
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
* @param name road或者water,建筑路径或者洪峰路径
|
||||
*/
|
||||
GameManager.prototype.set_Soil = function (order, road, name) {
|
||||
var direction = this.getXi_Soil(order, road);
|
||||
var length = 0;
|
||||
if (direction == "right") {
|
||||
length = this.map_Width - 1;
|
||||
// let temp = this.map_Width - 1;
|
||||
for (var i = road[order].x; i <= length; i++) {
|
||||
var n = i * this.map_Array[0].length + road[order].y;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
|
@ -464,7 +490,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
this.scheduleOnce;
|
||||
}
|
||||
else if (direction == "left") {
|
||||
length = 0;
|
||||
|
@ -511,8 +536,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// if(length == 0){
|
||||
// }
|
||||
this.soil_Find(direction, order, length, road, name);
|
||||
};
|
||||
//查找息壤蛮遗憾路径
|
||||
|
@ -523,8 +546,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = i * this.map_Array[0].length + road[order].y;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
if (i == start) {
|
||||
if (i == start && i == length)
|
||||
if (i == start && i == length) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), order, name);
|
||||
}
|
||||
else
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), null, name);
|
||||
var value = cc.v3(this.path_Array[order].x, this.path_Array[order].y, 0);
|
||||
|
@ -549,8 +574,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = i * this.map_Array[0].length + road[order].y;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
if (i == start) {
|
||||
if (i == start && i == length)
|
||||
if (i == start && i == length) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), order, name);
|
||||
}
|
||||
else
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), null, name);
|
||||
var value = cc.v3(this.path_Array[order].x, this.path_Array[order].y, 0);
|
||||
|
@ -576,10 +603,13 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = road[order].x * this.map_Array[0].length + i;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
if (i == start) {
|
||||
if (i == start && i == length)
|
||||
if (i == start && i == length) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), order, name);
|
||||
else
|
||||
}
|
||||
else {
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), null, name);
|
||||
}
|
||||
var value = cc.v3(this.path_Array[order].x, this.path_Array[order].y, 0);
|
||||
if (this.water_Array[this.water_Array.length - 1] != value) {
|
||||
// console.log("特别插入:",this.path_Array[order].x,this.path_Array[order].y);
|
||||
|
@ -604,8 +634,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = road[order].x * this.map_Array[0].length + i;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
if (i == start) {
|
||||
if (i == start && i == length)
|
||||
if (i == start && i == length) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), order, name);
|
||||
}
|
||||
else
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), null, name);
|
||||
var value = cc.v3(this.path_Array[order].x, this.path_Array[order].y, 0);
|
||||
|
@ -626,7 +658,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
}
|
||||
};
|
||||
//改变水流地图
|
||||
/**
|
||||
* 改变水流地图
|
||||
* @param value 需要根据使用息壤情况,插入到洪峰路径的点
|
||||
*/
|
||||
GameManager.prototype.changeWater = function (value) {
|
||||
var jg = true;
|
||||
if (this.water_Array.length > 0) {
|
||||
|
@ -637,7 +672,13 @@ var GameManager = /** @class */ (function (_super) {
|
|||
if (jg)
|
||||
this.water_Array.push(value);
|
||||
};
|
||||
//息壤过后改变修筑路径
|
||||
/**
|
||||
* 息壤过后改变修筑路径
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param number 息壤执行长度,改变息壤用后其他路径的X或Y值
|
||||
* @param direction 只为两个方向,横向false,纵向true
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
GameManager.prototype.changePath = function (order, number, direction, road) {
|
||||
for (var i = (order + 1); i < road.length; i++) {
|
||||
if (!direction) {
|
||||
|
@ -676,11 +717,17 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
}
|
||||
};
|
||||
//获取洪峰方向
|
||||
/**
|
||||
* 获取洪峰方向
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
GameManager.prototype.getDirection = function (order, road) {
|
||||
var name = "";
|
||||
//入海口比较复杂单独判断
|
||||
if (order == 0) {
|
||||
if (this.path_Array[order + 1].z == 6 && road == this.path_Array)
|
||||
order += 1;
|
||||
var nextX = road[order + 1].x - road[order].x;
|
||||
var nextY = road[order].y - road[order + 1].y;
|
||||
//在底边
|
||||
|
@ -842,8 +889,12 @@ var GameManager = /** @class */ (function (_super) {
|
|||
GameManager.prototype.backScene = function () {
|
||||
cc.director.loadScene("LoadScene");
|
||||
};
|
||||
//开始游戏
|
||||
/**
|
||||
* 开始修筑
|
||||
* @param data 记录操作的数组
|
||||
*/
|
||||
GameManager.prototype.startGame = function (data) {
|
||||
this.unschedule(this.updateWaterTime);
|
||||
for (var i = 0; i < this.block_Array.length; i++) {
|
||||
this.block_Array[i].getChildByName("tipWin").active = false;
|
||||
this.block_Array[i].getChildByName("tipLose").active = false;
|
||||
|
@ -866,7 +917,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var arr = this.changeStep(data);
|
||||
cc.fx.GameConfig.CLICK_SET("stepList", arr);
|
||||
};
|
||||
//用于埋点记录
|
||||
/**
|
||||
* 用于埋点记录 转变方向名称为埋点所需要格式
|
||||
* @param data 记录操作的数组
|
||||
*/
|
||||
GameManager.prototype.changeStep = function (data) {
|
||||
var arr = [];
|
||||
if (data.length > 0) {
|
||||
|
@ -901,7 +955,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
setTimeout(function () {
|
||||
if (_this.water_Array.length == 0) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
else {
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = _this.waterTime;
|
||||
|
@ -928,13 +981,13 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
if (this.countTime <= 0) {
|
||||
this.countTime = 0;
|
||||
this.setData(false);
|
||||
this.setData("lose");
|
||||
this.unschedule(this.updateCountDownTime);
|
||||
this.gameOver();
|
||||
}
|
||||
}
|
||||
};
|
||||
//上传每次操作数据
|
||||
//上传每次操作数据 success为成功还是失败
|
||||
GameManager.prototype.setData = function (success) {
|
||||
//设置埋点数据
|
||||
cc.fx.GameConfig.CLICK_SET("mapId", cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][this.custom].id);
|
||||
|
@ -943,6 +996,7 @@ var GameManager = /** @class */ (function (_super) {
|
|||
cc.fx.GameConfig.CLICK_SET("round", cc.fx.GameConfig.GM_INFO.round);
|
||||
cc.fx.GameConfig.CLICK_SET("timer", cc.fx.GameConfig.TIME_INFO.totalTime);
|
||||
cc.fx.GameConfig.CLICK_SET("cumulativeScore", cc.fx.GameConfig.GM_INFO.score);
|
||||
success = success == "lose" ? false : true;
|
||||
if (success != null) {
|
||||
cc.fx.GameConfig.CLICK_SET("success", success);
|
||||
cc.fx.GameConfig.GM_INFO.fen = this.getScore();
|
||||
|
@ -950,6 +1004,8 @@ var GameManager = /** @class */ (function (_super) {
|
|||
cc.fx.GameConfig.GM_INFO.fen = 0;
|
||||
cc.fx.GameConfig.CLICK_SET("getScore", cc.fx.GameConfig.GM_INFO.fen);
|
||||
cc.fx.GameConfig.GM_INFO.score += cc.fx.GameConfig.GM_INFO.fen;
|
||||
this.node.getChildByName("Top").getChildByName("id").getComponent(cc.Label).string =
|
||||
cc.fx.GameConfig.GM_INFO.score;
|
||||
cc.fx.GameConfig.CLICK_SET("cumulativeScore", cc.fx.GameConfig.GM_INFO.score);
|
||||
if (this.countTime != 0)
|
||||
cc.fx.GameConfig.GM_INFO.successList.push(success);
|
||||
|
@ -998,25 +1054,28 @@ var GameManager = /** @class */ (function (_super) {
|
|||
})
|
||||
.start();
|
||||
};
|
||||
//展示结果
|
||||
//展示结果 data为成功或者失败
|
||||
GameManager.prototype.showResult = function (data) {
|
||||
if (data == "lose") {
|
||||
cc.fx.AudioManager._instance.playEffect("lose", null);
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = -1;
|
||||
if (this.node.getChildByName("GameOver").active == false && this.node.getChildByName("Window").active == false) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, data);
|
||||
if (data == "lose") {
|
||||
cc.fx.AudioManager._instance.playEffect("lose", null);
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = -1;
|
||||
}
|
||||
else {
|
||||
cc.fx.AudioManager._instance.playEffect("win", null);
|
||||
}
|
||||
this.node.getChildByName("Window").active = true;
|
||||
this.node.getChildByName("Window").getComponent("Window").init(data);
|
||||
}
|
||||
else {
|
||||
cc.fx.AudioManager._instance.playEffect("win", null);
|
||||
}
|
||||
this.node.getChildByName("Window").active = true;
|
||||
this.node.getChildByName("Window").getComponent("Window").init(data);
|
||||
};
|
||||
//记录反应时长,以及做步骤提示
|
||||
//记录反应时长,以及做步骤提示 data为操作名称
|
||||
GameManager.prototype.clickSun = function (data) {
|
||||
//如果没有记录过 回合开始到操作反应时长,则第一次记录, 后面不记录
|
||||
if (cc.fx.GameConfig.CLICK_DATA.startTime == 0) {
|
||||
if (cc.fx.GameConfig.CLICK_DATA.startTime == -1) {
|
||||
this.finishiTime = cc.fx.GameTool.getTime();
|
||||
var now = this.finishiTime - this.startTime;
|
||||
// console.log("startTime:",now,this.startTime);
|
||||
// console.log("startTime:",this.finishiTime);
|
||||
cc.fx.GameConfig.CLICK_SET("startTime", now);
|
||||
}
|
||||
if (cc.fx.GameConfig.GM_INFO.level > 3)
|
||||
|
@ -1066,7 +1125,7 @@ var GameManager = /** @class */ (function (_super) {
|
|||
this.tip_Array.push([n]);
|
||||
}
|
||||
};
|
||||
//提示是否错误
|
||||
//提示是否错误 只前三关有 ,pos为位置,data为操作方向
|
||||
GameManager.prototype.tipCan = function (pos, data) {
|
||||
//先判断是否出边界
|
||||
if (pos.x < 0 || pos.x > this.map_Array.length - 1 || pos.y < 0 || pos.y > this.map_Array[0].length - 1) {
|
||||
|
@ -1076,20 +1135,27 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = pos.x * this.map_Array[0].length + pos.y;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
target.node.getChildByName("tipWin").active = true;
|
||||
// target.node.getChildByName("tipWin").opacity = 255;
|
||||
// target.node.getChildByName("tipLose").opacity = 255;
|
||||
//重复路回头路,或者山峰
|
||||
if (target.repeatRoad(false, null) == true || target.block_Type == 3) {
|
||||
this.tip_Array.push([cc.v3(pos.x, pos.y, 0)]);
|
||||
target.node.getChildByName("tipLose").active = true;
|
||||
target.node.getChildByName("tipWin").active = false;
|
||||
}
|
||||
//湿地 上一步如果没用息壤或者加固
|
||||
else if (target.block_Type == 2) {
|
||||
if (this.tip_Array.length > 1) {
|
||||
if (this.tip_Array.length > 0) {
|
||||
if (this.tip_Array[this.tip_Array.length - 1][0].z == 0) {
|
||||
target.node.getChildByName("tipLose").active = true;
|
||||
target.node.getChildByName("tipWin").active = false;
|
||||
}
|
||||
else if (this.tip_Array[this.tip_Array.length - 1][0].z == 2) {
|
||||
target.node.getChildByName("tipLose").active = false;
|
||||
target.node.getChildByName("tipWin").active = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
target.node.getChildByName("tipLose").active = true;
|
||||
target.node.getChildByName("tipWin").active = false;
|
||||
}
|
||||
}
|
||||
if (this.tip_Array.length > 0) {
|
||||
|
|
1084
library/imports/c1/c1af99dd-ee03-40f7-9609-d3887d0dd357.js
Normal file
|
@ -80,6 +80,13 @@ var NewClass = /** @class */ (function (_super) {
|
|||
};
|
||||
NewClass.prototype.start = function () {
|
||||
};
|
||||
/**
|
||||
* 息壤过后改变修筑路径
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param number 息壤执行长度,改变息壤用后其他路径的X或Y值
|
||||
* @param direction 只为两个方向,横向false,纵向true
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
//初始化地图块数据
|
||||
NewClass.prototype.initData = function (type, pos, max) {
|
||||
this.block_Type = type;
|
||||
|
@ -88,9 +95,9 @@ var NewClass = /** @class */ (function (_super) {
|
|||
if (type == cc.Enum(BlockType).Start) {
|
||||
var bg = this.node.getChildByName("sp");
|
||||
// this.node.getComponent(cc.Sprite).spriteFrame = null;
|
||||
bg.getComponent(cc.Sprite).spriteFrame = this.UI["_spriteFrames"]["start"];
|
||||
// bg.getComponent(cc.Sprite).spriteFrame = this.UI["_spriteFrames"]["start"];
|
||||
if (cc.fx.GameConfig.GM_INFO.level > 3) {
|
||||
bg.getChildByName("start").y = 20;
|
||||
// bg.getChildByName("start").y = 20;
|
||||
bg.getChildByName("end").y = 20;
|
||||
}
|
||||
this.rotateTarget(bg, "start", pos, max);
|
||||
|
@ -100,7 +107,7 @@ var NewClass = /** @class */ (function (_super) {
|
|||
// this.node.getComponent(cc.Sprite).spriteFrame = null;
|
||||
bg.getComponent(cc.Sprite).spriteFrame = this.UI["_spriteFrames"]["end"];
|
||||
if (cc.fx.GameConfig.GM_INFO.level > 3) {
|
||||
bg.getChildByName("start").y = 20;
|
||||
// bg.getChildByName("start").y = 20;
|
||||
bg.getChildByName("end").y = 20;
|
||||
}
|
||||
this.rotateTarget(bg, "end", pos, max);
|
||||
|
@ -285,11 +292,13 @@ var NewClass = /** @class */ (function (_super) {
|
|||
//息壤具体执行方法 外部可调用
|
||||
NewClass.prototype.set_Xi_SoilType = function (direction, end, name) {
|
||||
var _this = this;
|
||||
// console.log("息壤",direction,name,this.block_Type);
|
||||
// console.log("息壤",direction,name,end);
|
||||
var jg = this.repeatRoad(true, direction);
|
||||
console.log("息壤重复判断结果", jg);
|
||||
if (jg == true)
|
||||
if (jg == true) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
return;
|
||||
}
|
||||
if (this.block_Type == cc.Enum(BlockType).Start) {
|
||||
this.set_Xi_Soil(direction, false);
|
||||
return;
|
||||
|
@ -351,7 +360,6 @@ var NewClass = /** @class */ (function (_super) {
|
|||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
}
|
||||
else if (this.node.getChildByName("turn2").active == true && this.block_Type != cc.Enum(BlockType).Xi_Soil) {
|
||||
|
@ -359,24 +367,25 @@ var NewClass = /** @class */ (function (_super) {
|
|||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
}
|
||||
if (direction) {
|
||||
if (this.node.getChildByName("vertical2").active == true && this.block_Type == cc.Enum(BlockType).Xi_Soil && (direction == "up" || direction == "down")) {
|
||||
// alert("治水失败");
|
||||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
if (this.node.getChildByName("vertical2").angle == 0 || this.node.getChildByName("vertical2").angle == 180) {
|
||||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this.node.getChildByName("horizontal2").active == true && this.block_Type == cc.Enum(BlockType).Xi_Soil && (direction == "right" || direction == "left")) {
|
||||
else if (this.node.getChildByName("vertical2").active == true && this.block_Type == cc.Enum(BlockType).Xi_Soil && (direction == "right" || direction == "left")) {
|
||||
// alert("治水失败");
|
||||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
if (this.node.getChildByName("vertical2").angle == 90 || this.node.getChildByName("vertical2").angle == 270) {
|
||||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -495,7 +504,6 @@ var NewClass = /** @class */ (function (_super) {
|
|||
target = this.node.getChildByName("Reinforce");
|
||||
if (this.block_Type == cc.Enum(BlockType).Peak) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
return;
|
||||
}
|
||||
if (this.block_Type != cc.Enum(BlockType).End)
|
||||
|
@ -547,7 +555,7 @@ var NewClass = /** @class */ (function (_super) {
|
|||
else if (this.pos.y - posTemp.y >= 1) {
|
||||
direction = "down";
|
||||
}
|
||||
console.log("结束方向:", direction);
|
||||
// console.log("结束方向:",direction);
|
||||
if (!this.finishi) {
|
||||
this.finishi = true;
|
||||
this.set_Xi_Soil(direction, true);
|
||||
|
@ -597,14 +605,12 @@ var NewClass = /** @class */ (function (_super) {
|
|||
if (this.node.getChildByName("vertical").active == true && this.node.getChildByName("horizontal").active == true) {
|
||||
// alert("治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
// cc.director.loadScene("GameScene");
|
||||
return;
|
||||
}
|
||||
else if (this.node.getChildByName("turn").active == true && this.block_Type != cc.Enum(BlockType).Xi_Soil) {
|
||||
// alert("治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
// cc.director.loadScene("GameScene");
|
||||
return;
|
||||
}
|
||||
|
@ -722,7 +728,6 @@ var NewClass = /** @class */ (function (_super) {
|
|||
.call(function () {
|
||||
// alert("治水成功");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "win");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, true);
|
||||
if (cc.fx.GameConfig.GM_INFO.level < 7) {
|
||||
cc.fx.GameConfig.GM_INFO.level += 1;
|
||||
}
|
||||
|
@ -752,7 +757,6 @@ var NewClass = /** @class */ (function (_super) {
|
|||
.call(function () {
|
||||
// alert("治水失败")
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
// cc.director.loadScene("GameScene");
|
||||
})
|
||||
.start();
|
||||
|
|
|
@ -42,13 +42,13 @@
|
|||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 26
|
||||
"__id__": 38
|
||||
},
|
||||
{
|
||||
"__id__": 41
|
||||
"__id__": 47
|
||||
},
|
||||
{
|
||||
"__id__": 50
|
||||
"__id__": 62
|
||||
},
|
||||
{
|
||||
"__id__": 65
|
||||
|
@ -559,7 +559,7 @@
|
|||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Xi_Soil",
|
||||
"_name": "vertical2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
|
@ -574,18 +574,18 @@
|
|||
"_prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_opacity": 0,
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
"width": 96,
|
||||
"height": 96
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
@ -636,10 +636,12 @@
|
|||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "b76603e2-c166-4ce9-af37-417cdedde12e"
|
||||
},
|
||||
"_type": 3,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
|
@ -648,7 +650,9 @@
|
|||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -659,12 +663,12 @@
|
|||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c1rnBrwplFLLvmPviKv2Ng",
|
||||
"fileId": "59m0Fk9O9EjJ2NMsw4izxI",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "vertical2",
|
||||
"_name": "turn2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
|
@ -742,18 +746,18 @@
|
|||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "b76603e2-c166-4ce9-af37-417cdedde12e"
|
||||
"__uuid__": "c01c7783-54ca-426a-b44e-173f4dba8a8a"
|
||||
},
|
||||
"_type": 3,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 1,
|
||||
"_fillType": 2,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 1,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
|
@ -768,12 +772,12 @@
|
|||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "59m0Fk9O9EjJ2NMsw4izxI",
|
||||
"fileId": "d5D4goRj5NHYJ9Ls2YiLkA",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "turn2",
|
||||
"_name": "horizontal2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
|
@ -850,115 +854,6 @@
|
|||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "c01c7783-54ca-426a-b44e-173f4dba8a8a"
|
||||
},
|
||||
"_type": 3,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 2,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0.25,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "d5D4goRj5NHYJ9Ls2YiLkA",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "horizontal2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 25
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 96,
|
||||
"height": 96
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "b76603e2-c166-4ce9-af37-417cdedde12e"
|
||||
},
|
||||
|
@ -998,17 +893,17 @@
|
|||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 39
|
||||
"__id__": 36
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 40
|
||||
"__id__": 37
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1062,27 +957,27 @@
|
|||
"_name": "wave",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 26
|
||||
"__id__": 23
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 25
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
},
|
||||
{
|
||||
"__id__": 31
|
||||
},
|
||||
{
|
||||
"__id__": 34
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 37
|
||||
"__id__": 34
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 38
|
||||
"__id__": 35
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1136,17 +1031,17 @@
|
|||
"_name": "water1",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 29
|
||||
"__id__": 26
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 30
|
||||
"__id__": 27
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1200,7 +1095,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 28
|
||||
"__id__": 25
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1245,17 +1140,17 @@
|
|||
"_name": "water2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 32
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 33
|
||||
"__id__": 30
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1309,7 +1204,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 31
|
||||
"__id__": 28
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1354,17 +1249,17 @@
|
|||
"_name": "water3",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 35
|
||||
"__id__": 32
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 36
|
||||
"__id__": 33
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1418,7 +1313,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 34
|
||||
"__id__": 31
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1463,7 +1358,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1494,7 +1389,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 26
|
||||
"__id__": 23
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1516,7 +1411,7 @@
|
|||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_fillRange": 1,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
|
@ -1543,17 +1438,17 @@
|
|||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 42
|
||||
"__id__": 39
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 48
|
||||
"__id__": 45
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 49
|
||||
"__id__": 46
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1607,21 +1502,21 @@
|
|||
"_name": "wave",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 41
|
||||
"__id__": 38
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 43
|
||||
"__id__": 40
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 46
|
||||
"__id__": 43
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 47
|
||||
"__id__": 44
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1675,17 +1570,17 @@
|
|||
"_name": "water",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 42
|
||||
"__id__": 39
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 44
|
||||
"__id__": 41
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 45
|
||||
"__id__": 42
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1739,7 +1634,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 43
|
||||
"__id__": 40
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1784,7 +1679,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 42
|
||||
"__id__": 39
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1815,7 +1710,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 41
|
||||
"__id__": 38
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1864,17 +1759,17 @@
|
|||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 63
|
||||
"__id__": 60
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 64
|
||||
"__id__": 61
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1903,8 +1798,8 @@
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
0.7071067811865475,
|
||||
0.7071067811865476,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
|
@ -1914,7 +1809,7 @@
|
|||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 90
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
|
@ -1928,27 +1823,27 @@
|
|||
"_name": "wave",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 50
|
||||
"__id__": 47
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 49
|
||||
},
|
||||
{
|
||||
"__id__": 52
|
||||
},
|
||||
{
|
||||
"__id__": 55
|
||||
},
|
||||
{
|
||||
"__id__": 58
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 61
|
||||
"__id__": 58
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 62
|
||||
"__id__": 59
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2002,17 +1897,17 @@
|
|||
"_name": "water1",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 53
|
||||
"__id__": 50
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 54
|
||||
"__id__": 51
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2066,7 +1961,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 52
|
||||
"__id__": 49
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2111,17 +2006,17 @@
|
|||
"_name": "water2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 56
|
||||
"__id__": 53
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 57
|
||||
"__id__": 54
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2175,7 +2070,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 55
|
||||
"__id__": 52
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2220,17 +2115,17 @@
|
|||
"_name": "water3",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 59
|
||||
"__id__": 56
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 60
|
||||
"__id__": 57
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2284,7 +2179,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 58
|
||||
"__id__": 55
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2329,7 +2224,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2360,7 +2255,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 50
|
||||
"__id__": 47
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2382,7 +2277,7 @@
|
|||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_fillRange": 1,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
|
@ -2411,11 +2306,11 @@
|
|||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 66
|
||||
"__id__": 63
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 67
|
||||
"__id__": 64
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2469,7 +2364,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 65
|
||||
"__id__": 62
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2507,6 +2402,113 @@
|
|||
"fileId": "b2Xfw7RPZMhrj9rvQnCwPq",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Xi_Soil",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 66
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 67
|
||||
},
|
||||
"_opacity": 0,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 65
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c1rnBrwplFLLvmPviKv2Ng",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "sp",
|
||||
|
@ -2621,7 +2623,7 @@
|
|||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
-72,
|
||||
-24.891,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -2730,7 +2732,7 @@
|
|||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
-72,
|
||||
20,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
|
|
@ -49,14 +49,15 @@ var NewClass = /** @class */ (function (_super) {
|
|||
this.canTouch = true;
|
||||
this.Reinforce = false;
|
||||
this.Soil = false;
|
||||
this.mapHeight = 0;
|
||||
};
|
||||
NewClass.prototype.setPosition = function (tip) {
|
||||
tip.setPosition(30, -35);
|
||||
tip.setPosition(30, -25);
|
||||
if (this.tipArray.length > 0) {
|
||||
var length = this.tipArray.length + 1;
|
||||
var posY = Math.ceil(length / 8) - 1;
|
||||
var posX = length - Math.floor(posY) * 8 - 1;
|
||||
tip.setPosition(30 + 48 * posX, -35 - 48 * posY);
|
||||
tip.setPosition(30 + 48 * posX, -25 - 48 * posY + this.mapHeight);
|
||||
}
|
||||
};
|
||||
//清空所有
|
||||
|
@ -76,6 +77,7 @@ var NewClass = /** @class */ (function (_super) {
|
|||
var drawingReset = cc.fx.GameConfig.CLICK_DATA.drawingReset + 1;
|
||||
cc.fx.GameConfig.CLICK_SET("drawingReset", drawingReset);
|
||||
cc.fx.Notifications.emit(cc.fx.Message.removeTip, "remove");
|
||||
this.mapHeight = 0;
|
||||
}
|
||||
};
|
||||
//撤回一步
|
||||
|
@ -93,6 +95,11 @@ var NewClass = /** @class */ (function (_super) {
|
|||
var drawingBack = cc.fx.GameConfig.CLICK_DATA.drawingBack + 1;
|
||||
cc.fx.GameConfig.CLICK_SET("drawingBack", drawingBack);
|
||||
cc.fx.Notifications.emit(cc.fx.Message.removeTip, "back");
|
||||
if (this.tipArray.length >= 24) {
|
||||
if ((this.tipArray.length) % 8 == 0) {
|
||||
this.mapMove(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
//点击事件
|
||||
|
@ -158,6 +165,25 @@ var NewClass = /** @class */ (function (_super) {
|
|||
this.setPosition(tip);
|
||||
this.tipArray.push(tip);
|
||||
this.controlArray.push(data);
|
||||
if (this.tipArray.length >= 25) {
|
||||
if ((this.tipArray.length - 1) % 8 == 0) {
|
||||
this.mapMove(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
//地图放不下了上下移动
|
||||
NewClass.prototype.mapMove = function (type) {
|
||||
if (type)
|
||||
this.mapHeight += 48;
|
||||
else
|
||||
this.mapHeight -= 48;
|
||||
for (var i = 0; i < this.tipArray.length; i++) {
|
||||
var tip = this.tipArray[i];
|
||||
if (type)
|
||||
tip.y += 48;
|
||||
else
|
||||
tip.y -= 48;
|
||||
}
|
||||
};
|
||||
//点击开始 创建河道
|
||||
NewClass.prototype.start_Click = function () {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"width": 592.2708740234375,
|
||||
"width": 592,
|
||||
"height": 556.3333740234375,
|
||||
"type": "panel",
|
||||
"active": 0,
|
||||
|
@ -47,7 +47,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"width": 463.72918701171875,
|
||||
"width": 464,
|
||||
"height": 556.3333740234375,
|
||||
"type": "panel",
|
||||
"active": 0,
|
||||
|
@ -66,8 +66,7 @@
|
|||
"cocos-services"
|
||||
]
|
||||
},
|
||||
" common-asset-worker-worker": {},
|
||||
"window-1723024435868": {}
|
||||
" common-asset-worker-worker": {}
|
||||
},
|
||||
"panels": {
|
||||
"builder": {
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
"774829bb-123e-48b6-930e-6b3e02491506",
|
||||
"badb56f7-1c07-4fbb-87e6-5bfd805fe81b",
|
||||
"ec5b9995-a54c-47bd-adb5-27ec0160146e",
|
||||
"47657f05-243e-4f2a-a32d-200631f1c252",
|
||||
"9e91c351-bd17-446b-b773-3b715fe6ba48",
|
||||
"7a90e76c-37f8-4f8c-84e9-f05b34afe481",
|
||||
"a264c8df-80f6-474f-9fe5-28b7ae529d95",
|
||||
"2d2f792f-a40c-49bb-a189-ed176a246e49",
|
||||
"4b9c5a7e-c645-48a4-9aca-5df381ce4ef5",
|
||||
"47657f05-243e-4f2a-a32d-200631f1c252",
|
||||
"7a90e76c-37f8-4f8c-84e9-f05b34afe481",
|
||||
"9e91c351-bd17-446b-b773-3b715fe6ba48",
|
||||
"c930d64e-2707-474f-b691-6220e2932ddd",
|
||||
"4eaf518b-35ec-4262-928d-4d497c3f2830",
|
||||
"4b9c5a7e-c645-48a4-9aca-5df381ce4ef5",
|
||||
"9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -318,7 +318,6 @@
|
|||
"d0//teSn9MOrS6zX5lq7wL",
|
||||
"6aYldBOgxFNrE2jJsdHsij",
|
||||
"b0VHqWWqlJ4qVyuwnLGCWw",
|
||||
"9cGs4RKSJKTpqftR7BbmsD",
|
||||
"498wR2XHdOOLMOU/dKD+z0",
|
||||
"19aZr0u+hCzZNBjhYMLSEg",
|
||||
"5fb3cZvfFNUJJIJgBgrqF0",
|
||||
|
@ -358,9 +357,6 @@
|
|||
"e5q9G+KmhDJpuNC8xn8nH2",
|
||||
"d3jq6v8p5O9olVnWFo8jSm",
|
||||
"5axZieq0xBrZg/bumycVo6",
|
||||
"6fPkjulzRM/KpX72tRwVXE",
|
||||
"38W553yg5Eb7hWieApX8uW",
|
||||
"88N4woFa9IYYMMQWoiM/TH",
|
||||
"c3GH+XORlHnb1CGo4F6R3k",
|
||||
"66vvOMR9xJ5JYDBUumSkcM",
|
||||
"071Ba/COBOvYAj8KyEeSm3",
|
||||
|
@ -379,6 +375,61 @@
|
|||
"67/Pt6WVtDz4Gn640NbXwt",
|
||||
"8ak5WlHVBELqSzRzcpZa3P",
|
||||
"cf4fwLe4hJXLYT5vY7WfC9",
|
||||
"10unPSfi1NUb30N1EjhieB"
|
||||
"10unPSfi1NUb30N1EjhieB",
|
||||
"31Btiq7dpG4qHh/hGZ2CgP",
|
||||
"ad2BQj6zdPeZX/8yKoB4gE",
|
||||
"d9b9KGCedHuINCxSJsmDrl",
|
||||
"1cU5EOpgtDDqec2XgapIB2",
|
||||
"78JSJM3cNNdqWJ4QGDHs8v",
|
||||
"3do3M3t+RLCoJwZq/71Unv",
|
||||
"22+6lzgV9Fo5n9udluiB58",
|
||||
"9cDLeCh9xKSqQgavB4yNRk",
|
||||
"2btmyB/BZA2qj8/TTNvJPt",
|
||||
"6bhBr28NhHPbzfmgsXvu9a",
|
||||
"e6x7Hyb8JBYrqazCvhwE03",
|
||||
"a9IJc4QNlEYaKUajKjsmJn",
|
||||
"440p8m6m5BnZUW6+O6AiVF",
|
||||
"a2TtYPYvtKvpBdXeDxW+VV",
|
||||
"a6zWdJ6/1ARZz6hW5mri7b",
|
||||
"89bfts9UNLsp6OOIzvNRhK",
|
||||
"0dB8gIJkpCxoRMcZvxwA60",
|
||||
"01OuiuFTpKupaaHRgNLKSt",
|
||||
"c82Wv9YABJs5/VqfCc83T2",
|
||||
"fd5aHkCKVK56NvUo/OV7UT",
|
||||
"591LNXv5JB/b2szAcggcbF",
|
||||
"193BD/cNhL0L3Dwjk+JxnS",
|
||||
"dbiPAUaHJKf7YH10+vYhUI",
|
||||
"f9/CvvkTJLc4IcBQ6oy0et",
|
||||
"60fY9vJgNPMLSTdYlIRBqM",
|
||||
"9fvo6KA6hNX726OUEDSZKo",
|
||||
"2bxnBM50tJOJyNTp/oSmvg",
|
||||
"5dxBdyCr9Dd7WMwsS/0Owj",
|
||||
"3cHyo4dcFCTq7F8xOxx9Gu",
|
||||
"f6s+f4C8pGpZ82vNPBkzDz",
|
||||
"98ZF8ZYRhOUqDIYr5A3dB5",
|
||||
"2efFBLDDhNTqH9dX04WFP+",
|
||||
"0ctFd9KxdEHKRPTiJoxoHC",
|
||||
"2066BnmhFM3KauxDFa87PT",
|
||||
"adFVQLJ1JH8oK1tGCZ76Ky",
|
||||
"95tXbwV6dNL7+qqMRsKxh3",
|
||||
"cb6AAuSbZNUI7lzt5vriTI",
|
||||
"17nbPwghtHnoi+9Ci4WPBS",
|
||||
"6a2TLGp+ZHfI6WX2+HG3yq",
|
||||
"1aAko3URBHuYZx63bkeM8s",
|
||||
"16h2z5S9BH7LJV7ZVODN9T",
|
||||
"d10hH+9dtKfKJdoDIHvK+b",
|
||||
"6fPkjulzRM/KpX72tRwVXE",
|
||||
"38W553yg5Eb7hWieApX8uW",
|
||||
"1ebppMR7JCy5TfNlkcPyka",
|
||||
"35SBmBh6ZEaZHslKp0AR0i",
|
||||
"7b6fVabXxJaqzBIOHpQ90/",
|
||||
"60I/ZhSKBDhos2sk2SnUFk",
|
||||
"63svIRvqhKW582OcEzugCQ",
|
||||
"c7T9Vyj5VEYrBFFN84sNJ/",
|
||||
"f0DxQigvVOb55ZRJyyQteM",
|
||||
"a7mQUuP7dE3o9p6+b25iSz",
|
||||
"88N4woFa9IYYMMQWoiM/TH",
|
||||
"2dvFGf0U9OKKhKCqEvtwLT",
|
||||
"9cGs4RKSJKTpqftR7BbmsD"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"last-module-event-record-time": 1722841471609,
|
||||
"last-module-event-record-time": 1723446279886,
|
||||
"group-list": [
|
||||
"default"
|
||||
],
|
||||
|
|
|
@ -1423,8 +1423,8 @@
|
|||
"__id__": 4
|
||||
},
|
||||
"_enabled": true,
|
||||
"localTest": true,
|
||||
"clientTestVersion": "1.1.5",
|
||||
"localTest": false,
|
||||
"clientTestVersion": "1.2.9",
|
||||
"testVersion": {
|
||||
"__id__": 19
|
||||
},
|
||||
|
|
|
@ -42,13 +42,13 @@
|
|||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 26
|
||||
"__id__": 38
|
||||
},
|
||||
{
|
||||
"__id__": 41
|
||||
"__id__": 47
|
||||
},
|
||||
{
|
||||
"__id__": 50
|
||||
"__id__": 62
|
||||
},
|
||||
{
|
||||
"__id__": 65
|
||||
|
@ -559,7 +559,7 @@
|
|||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Xi_Soil",
|
||||
"_name": "vertical2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
|
@ -574,18 +574,18 @@
|
|||
"_prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_opacity": 0,
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
"width": 96,
|
||||
"height": 96
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
@ -636,10 +636,12 @@
|
|||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "b76603e2-c166-4ce9-af37-417cdedde12e"
|
||||
},
|
||||
"_type": 3,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
|
@ -648,7 +650,9 @@
|
|||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -659,12 +663,12 @@
|
|||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c1rnBrwplFLLvmPviKv2Ng",
|
||||
"fileId": "59m0Fk9O9EjJ2NMsw4izxI",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "vertical2",
|
||||
"_name": "turn2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
|
@ -742,18 +746,18 @@
|
|||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "b76603e2-c166-4ce9-af37-417cdedde12e"
|
||||
"__uuid__": "c01c7783-54ca-426a-b44e-173f4dba8a8a"
|
||||
},
|
||||
"_type": 3,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 1,
|
||||
"_fillType": 2,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 1,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
|
@ -768,12 +772,12 @@
|
|||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "59m0Fk9O9EjJ2NMsw4izxI",
|
||||
"fileId": "d5D4goRj5NHYJ9Ls2YiLkA",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "turn2",
|
||||
"_name": "horizontal2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
|
@ -850,115 +854,6 @@
|
|||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "c01c7783-54ca-426a-b44e-173f4dba8a8a"
|
||||
},
|
||||
"_type": 3,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 2,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0.25,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "d5D4goRj5NHYJ9Ls2YiLkA",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "horizontal2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 25
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 96,
|
||||
"height": 96
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "b76603e2-c166-4ce9-af37-417cdedde12e"
|
||||
},
|
||||
|
@ -998,17 +893,17 @@
|
|||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 39
|
||||
"__id__": 36
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 40
|
||||
"__id__": 37
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1062,27 +957,27 @@
|
|||
"_name": "wave",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 26
|
||||
"__id__": 23
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 25
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
},
|
||||
{
|
||||
"__id__": 31
|
||||
},
|
||||
{
|
||||
"__id__": 34
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 37
|
||||
"__id__": 34
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 38
|
||||
"__id__": 35
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1136,17 +1031,17 @@
|
|||
"_name": "water1",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 29
|
||||
"__id__": 26
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 30
|
||||
"__id__": 27
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1200,7 +1095,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 28
|
||||
"__id__": 25
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1245,17 +1140,17 @@
|
|||
"_name": "water2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 32
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 33
|
||||
"__id__": 30
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1309,7 +1204,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 31
|
||||
"__id__": 28
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1354,17 +1249,17 @@
|
|||
"_name": "water3",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 35
|
||||
"__id__": 32
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 36
|
||||
"__id__": 33
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1418,7 +1313,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 34
|
||||
"__id__": 31
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1463,7 +1358,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 27
|
||||
"__id__": 24
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1494,7 +1389,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 26
|
||||
"__id__": 23
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1516,7 +1411,7 @@
|
|||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_fillRange": 1,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
|
@ -1543,17 +1438,17 @@
|
|||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 42
|
||||
"__id__": 39
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 48
|
||||
"__id__": 45
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 49
|
||||
"__id__": 46
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1607,21 +1502,21 @@
|
|||
"_name": "wave",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 41
|
||||
"__id__": 38
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 43
|
||||
"__id__": 40
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 46
|
||||
"__id__": 43
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 47
|
||||
"__id__": 44
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1675,17 +1570,17 @@
|
|||
"_name": "water",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 42
|
||||
"__id__": 39
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 44
|
||||
"__id__": 41
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 45
|
||||
"__id__": 42
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1739,7 +1634,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 43
|
||||
"__id__": 40
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1784,7 +1679,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 42
|
||||
"__id__": 39
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1815,7 +1710,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 41
|
||||
"__id__": 38
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -1864,17 +1759,17 @@
|
|||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 63
|
||||
"__id__": 60
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 64
|
||||
"__id__": 61
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -1903,8 +1798,8 @@
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
0.7071067811865475,
|
||||
0.7071067811865476,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
|
@ -1914,7 +1809,7 @@
|
|||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 90
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
|
@ -1928,27 +1823,27 @@
|
|||
"_name": "wave",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 50
|
||||
"__id__": 47
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 49
|
||||
},
|
||||
{
|
||||
"__id__": 52
|
||||
},
|
||||
{
|
||||
"__id__": 55
|
||||
},
|
||||
{
|
||||
"__id__": 58
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 61
|
||||
"__id__": 58
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 62
|
||||
"__id__": 59
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2002,17 +1897,17 @@
|
|||
"_name": "water1",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 53
|
||||
"__id__": 50
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 54
|
||||
"__id__": 51
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2066,7 +1961,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 52
|
||||
"__id__": 49
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2111,17 +2006,17 @@
|
|||
"_name": "water2",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 56
|
||||
"__id__": 53
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 57
|
||||
"__id__": 54
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2175,7 +2070,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 55
|
||||
"__id__": 52
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2220,17 +2115,17 @@
|
|||
"_name": "water3",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 59
|
||||
"__id__": 56
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 60
|
||||
"__id__": 57
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2284,7 +2179,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 58
|
||||
"__id__": 55
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2329,7 +2224,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 51
|
||||
"__id__": 48
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2360,7 +2255,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 50
|
||||
"__id__": 47
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2382,7 +2277,7 @@
|
|||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_fillRange": 1,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "9830637c-e4e3-4df5-8d51-fc49b7d715b4"
|
||||
|
@ -2411,11 +2306,11 @@
|
|||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 66
|
||||
"__id__": 63
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 67
|
||||
"__id__": 64
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
|
@ -2469,7 +2364,7 @@
|
|||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 65
|
||||
"__id__": 62
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
|
@ -2507,6 +2402,113 @@
|
|||
"fileId": "b2Xfw7RPZMhrj9rvQnCwPq",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Xi_Soil",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 66
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 67
|
||||
},
|
||||
"_opacity": 0,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 65
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c1rnBrwplFLLvmPviKv2Ng",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "sp",
|
||||
|
@ -2621,7 +2623,7 @@
|
|||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
-72,
|
||||
-24.891,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -2730,7 +2732,7 @@
|
|||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
-72,
|
||||
20,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":"1.0.8","stats":{"C:/Work/Project/WaterControl/temp/quick-scripts/src/__qc_index__.js":"2024-08-07T09:53:51.956Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Mask.js":"2024-08-07T09:53:33.976Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoSprite.js":"2024-08-07T09:53:33.957Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js":"2024-08-07T09:53:33.972Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/GameScene.js":"2024-08-07T09:53:34.000Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/GameOver.js":"2024-08-07T09:53:33.974Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/RankManager.js":"2024-08-07T09:53:33.999Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/DynamicAtlasManager.js":"2024-08-07T09:53:33.964Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Block.js":"2024-08-07T09:53:33.985Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Window.js":"2024-08-07T09:53:33.949Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/ControlManager.js":"2024-08-07T09:53:33.994Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/GameManager.js":"2024-08-07T09:53:33.980Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Load.js":"2024-08-07T09:53:33.954Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoTiledLayer.js":"2024-08-07T09:53:33.992Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Map.js":"2024-08-07T09:53:33.945Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoAssembler.js":"2024-08-07T09:53:33.943Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoTiledMap.js":"2024-08-07T09:53:33.939Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/GameStart/GameAppStart.js":"2024-08-07T09:53:33.966Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoObjectGroup.js":"2024-08-07T09:53:33.947Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Crypto/HttpUtil.js":"2024-08-07T09:53:33.970Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/RankList/ItemRender.js":"2024-08-07T09:53:33.988Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Notification/Notification.js":"2024-08-07T09:53:33.960Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Sdk/Main.js":"2024-08-07T09:53:33.978Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Storage/Storage.js":"2024-08-07T09:53:33.941Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Config/GameConfig.js":"2024-08-07T09:53:33.984Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Music/AudioManager.js":"2024-08-07T09:53:33.962Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Share/share.js":"2024-08-07T09:53:33.969Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/RankList/List.js":"2024-08-07T09:53:33.990Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Sdk/DouyinEntranceView.js":"2024-08-07T09:53:33.936Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Tool/GameTool.js":"2024-08-07T09:53:33.953Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Sdk/MiniGameSdk.js":"2024-08-07T09:53:33.982Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Crypto/crypto-js.min.js":"2024-08-07T09:53:33.996Z"}}
|
||||
{"version":"1.0.8","stats":{"C:/Work/Project/WaterControl/temp/quick-scripts/src/__qc_index__.js":"2024-08-15T07:21:59.864Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Sdk/MiniGameSdk.js":"2024-08-15T07:21:59.791Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/GameStart/GameAppStart.js":"2024-08-15T07:21:59.779Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoTiledLayer.js":"2024-08-15T07:21:59.802Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Mask.js":"2024-08-15T07:21:59.787Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Notification/Notification.js":"2024-08-15T07:21:59.774Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js":"2024-08-15T07:21:59.784Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Tool/GameTool.js":"2024-08-15T07:21:59.768Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Music/AudioManager.js":"2024-08-15T07:21:59.775Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Share/share.js":"2024-08-15T07:21:59.781Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Config/GameConfig.js":"2024-08-15T07:21:59.794Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/RankList/ItemRender.js":"2024-08-15T07:21:59.799Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/GameScene.js":"2024-08-15T07:21:59.812Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Storage/Storage.js":"2024-08-15T07:21:59.758Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/DynamicAtlasManager.js":"2024-08-15T07:21:59.777Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Map.js":"2024-08-15T07:21:59.764Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Load.js":"2024-08-15T07:21:59.771Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/RankManager.js":"2024-08-15T07:21:59.808Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Window.js":"2024-08-15T07:21:59.766Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/GameManager.js":"2024-08-15T07:21:59.788Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/Block.js":"2024-08-15T07:21:59.796Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/GameOver.js":"2024-08-15T07:21:59.786Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/ControlManager.js":"2024-08-15T07:21:59.803Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoSprite.js":"2024-08-15T07:21:59.772Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/RankList/List.js":"2024-08-15T07:21:59.800Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoTiledMap.js":"2024-08-15T07:21:59.754Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoAssembler.js":"2024-08-15T07:21:59.760Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/tiledmap-optimize-resource/Script/TmoObjectGroup.js":"2024-08-15T07:21:59.765Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Crypto/HttpUtil.js":"2024-08-15T07:21:59.783Z","C:/Work/Project/WaterControl/temp/quick-scripts/src/assets/Script/module/Crypto/crypto-js.min.js":"2024-08-15T07:21:59.805Z"}}
|
||||
|
|
|
@ -20,6 +20,7 @@ require('./assets/Script/Load');
|
|||
require('./assets/Script/Map');
|
||||
require('./assets/Script/Mask');
|
||||
require('./assets/Script/RankManager');
|
||||
require('./assets/Script/Sdk/MiniGameSdk');
|
||||
require('./assets/Script/Window');
|
||||
require('./assets/Script/module/Config/GameConfig');
|
||||
require('./assets/Script/module/Crypto/HttpUtil');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
(function () {
|
||||
var scripts = [{"deps":{"./assets/Script/DynamicAtlasManager":7,"./assets/Script/GameManager":11,"./assets/Script/GameOver":5,"./assets/Script/GameScene":4,"./assets/Script/Load":12,"./assets/Script/Map":14,"./assets/Script/Mask":1,"./assets/Script/RankManager":6,"./assets/Script/Window":9,"./assets/Script/Block":8,"./assets/migration/use_v2.1-2.2.1_cc.Toggle_event":3,"./assets/Script/ControlManager":10,"./assets/Script/module/Crypto/crypto-js.min":28,"./assets/Script/module/Crypto/HttpUtil":19,"./assets/Script/module/GameStart/GameAppStart":17,"./assets/Script/module/Music/AudioManager":24,"./assets/Script/module/Notification/Notification":21,"./assets/Script/module/RankList/List":26,"./assets/Script/module/RankList/ItemRender":20,"./assets/Script/module/Share/share":25,"./assets/Script/module/Storage/Storage":22,"./assets/Script/module/Tool/GameTool":27,"./assets/Script/module/Config/GameConfig":23,"./tiledmap-optimize-resource/Script/TmoSprite":2,"./tiledmap-optimize-resource/Script/TmoTiledLayer":13,"./tiledmap-optimize-resource/Script/TmoTiledMap":16,"./tiledmap-optimize-resource/Script/TmoAssembler":15,"./tiledmap-optimize-resource/Script/TmoObjectGroup":18},"path":"preview-scripts/__qc_index__.js"},{"deps":{},"path":"preview-scripts/assets/Script/Mask.js"},{"deps":{"./TmoAssembler":15},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoSprite.js"},{"deps":{},"path":"preview-scripts/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameScene.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameOver.js"},{"deps":{"./module/RankList/List":26},"path":"preview-scripts/assets/Script/RankManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/DynamicAtlasManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/Block.js"},{"deps":{},"path":"preview-scripts/assets/Script/Window.js"},{"deps":{},"path":"preview-scripts/assets/Script/ControlManager.js"},{"deps":{"./Block":8},"path":"preview-scripts/assets/Script/GameManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/Load.js"},{"deps":{},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoTiledLayer.js"},{"deps":{},"path":"preview-scripts/assets/Script/Map.js"},{"deps":{},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoAssembler.js"},{"deps":{"./TmoTiledLayer":13,"./TmoObjectGroup":18},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoTiledMap.js"},{"deps":{"../Config/GameConfig":23,"../Crypto/HttpUtil":19,"../Music/AudioManager":24,"../Notification/Notification":21,"../Storage/Storage":22,"../Tool/GameTool":27},"path":"preview-scripts/assets/Script/module/GameStart/GameAppStart.js"},{"deps":{"./TmoSprite":2},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoObjectGroup.js"},{"deps":{"./crypto-js.min.js":28},"path":"preview-scripts/assets/Script/module/Crypto/HttpUtil.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/RankList/ItemRender.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Notification/Notification.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Storage/Storage.js"},{"deps":{"../Share/share":25},"path":"preview-scripts/assets/Script/module/Config/GameConfig.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Music/AudioManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Share/share.js"},{"deps":{"./ItemRender":20},"path":"preview-scripts/assets/Script/module/RankList/List.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Tool/GameTool.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Crypto/crypto-js.min.js"}];
|
||||
var scripts = [{"deps":{"./assets/Script/DynamicAtlasManager":14,"./assets/Script/GameManager":19,"./assets/Script/GameOver":21,"./assets/Script/GameScene":12,"./assets/Script/Load":16,"./assets/Script/Map":15,"./assets/Script/Mask":4,"./assets/Script/RankManager":17,"./assets/Script/Window":18,"./assets/Script/Block":20,"./assets/Script/Sdk/MiniGameSdk":1,"./assets/migration/use_v2.1-2.2.1_cc.Toggle_event":6,"./assets/Script/ControlManager":22,"./assets/Script/module/Crypto/crypto-js.min":29,"./assets/Script/module/Crypto/HttpUtil":28,"./assets/Script/module/GameStart/GameAppStart":2,"./assets/Script/module/Music/AudioManager":8,"./assets/Script/module/Notification/Notification":5,"./assets/Script/module/RankList/List":24,"./assets/Script/module/RankList/ItemRender":11,"./assets/Script/module/Share/share":9,"./assets/Script/module/Storage/Storage":13,"./assets/Script/module/Tool/GameTool":7,"./assets/Script/module/Config/GameConfig":10,"./tiledmap-optimize-resource/Script/TmoSprite":23,"./tiledmap-optimize-resource/Script/TmoTiledLayer":3,"./tiledmap-optimize-resource/Script/TmoTiledMap":25,"./tiledmap-optimize-resource/Script/TmoAssembler":26,"./tiledmap-optimize-resource/Script/TmoObjectGroup":27},"path":"preview-scripts/__qc_index__.js"},{"deps":{},"path":"preview-scripts/assets/Script/Sdk/MiniGameSdk.js"},{"deps":{"../Config/GameConfig":10,"../Crypto/HttpUtil":28,"../Music/AudioManager":8,"../Notification/Notification":5,"../Storage/Storage":13,"../Tool/GameTool":7},"path":"preview-scripts/assets/Script/module/GameStart/GameAppStart.js"},{"deps":{},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoTiledLayer.js"},{"deps":{},"path":"preview-scripts/assets/Script/Mask.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Notification/Notification.js"},{"deps":{},"path":"preview-scripts/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Tool/GameTool.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Music/AudioManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Share/share.js"},{"deps":{"../Share/share":9},"path":"preview-scripts/assets/Script/module/Config/GameConfig.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/RankList/ItemRender.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameScene.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Storage/Storage.js"},{"deps":{},"path":"preview-scripts/assets/Script/DynamicAtlasManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/Map.js"},{"deps":{},"path":"preview-scripts/assets/Script/Load.js"},{"deps":{"./module/RankList/List":24},"path":"preview-scripts/assets/Script/RankManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/Window.js"},{"deps":{"./Block":20},"path":"preview-scripts/assets/Script/GameManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/Block.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameOver.js"},{"deps":{},"path":"preview-scripts/assets/Script/ControlManager.js"},{"deps":{"./TmoAssembler":26},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoSprite.js"},{"deps":{"./ItemRender":11},"path":"preview-scripts/assets/Script/module/RankList/List.js"},{"deps":{"./TmoTiledLayer":3,"./TmoObjectGroup":27},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoTiledMap.js"},{"deps":{},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoAssembler.js"},{"deps":{"./TmoSprite":23},"path":"preview-scripts/tiledmap-optimize-resource/Script/TmoObjectGroup.js"},{"deps":{"./crypto-js.min.js":29},"path":"preview-scripts/assets/Script/module/Crypto/HttpUtil.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Crypto/crypto-js.min.js"}];
|
||||
var entries = ["preview-scripts/__qc_index__.js"];
|
||||
var bundleScript = 'preview-scripts/__qc_bundle__.js';
|
||||
|
||||
|
|
|
@ -50,6 +50,18 @@ var NewClass = /** @class */ (function (_super) {
|
|||
cc.fx.GameConfig.init(this.localTest);
|
||||
// cc.fx.AudioManager.Instance.init();
|
||||
this.testVersion.string = this.clientTestVersion;
|
||||
var urlNow = window.location.href;
|
||||
if (this.containsTrain(urlNow)) {
|
||||
console.log("无排行版本");
|
||||
this.node.getChildByName("Rank").active = false;
|
||||
}
|
||||
else {
|
||||
console.log("有排行版本");
|
||||
}
|
||||
};
|
||||
//判断来源
|
||||
NewClass.prototype.containsTrain = function (str) {
|
||||
return /from=train/i.test(str);
|
||||
};
|
||||
//开始游戏,跳转至引导页面
|
||||
NewClass.prototype.startGame = function () {
|
||||
|
@ -94,4 +106,4 @@ cc._RF.pop();
|
|||
});
|
||||
}
|
||||
})();
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxMb2FkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNNLElBQUEsS0FBd0MsRUFBRSxDQUFDLFVBQVUsRUFBcEQsT0FBTyxhQUFBLEVBQUUsUUFBUSxjQUFBLEVBQUUsZ0JBQWdCLHNCQUFpQixDQUFDO0FBRzVEO0lBQXNDLDRCQUFZO0lBQWxEO1FBQUEscUVBb0NDO1FBakNHLGVBQVMsR0FBWSxLQUFLLENBQUM7UUFHM0IsdUJBQWlCLEdBQVcsT0FBTyxDQUFDO1FBR3BDLGlCQUFXLEdBQWEsSUFBSSxDQUFDOztJQTJCakMsQ0FBQztJQXpCRyx3QkFBSyxHQUFMO1FBQ0ksRUFBRSxDQUFDLEtBQUssQ0FBQyxlQUFlLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDaEMsTUFBTSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ2pCLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUM7UUFDdEMsc0NBQXNDO1FBQ3RDLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxpQkFBaUIsQ0FBQztJQUNyRCxDQUFDO0lBRUQsY0FBYztJQUNkLDRCQUFTLEdBQVQ7UUFDSSxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztRQUNuQyx1Q0FBdUM7SUFDM0MsQ0FBQztJQUNELGdCQUFnQjtJQUNoQiwyQkFBUSxHQUFSLFVBQVMsS0FBSyxFQUFDLElBQUk7UUFDZixFQUFFLENBQUMsRUFBRSxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsTUFBTSxHQUFHLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNqRCxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN2QyxDQUFDO0lBQ0QsT0FBTztJQUNQLDJCQUFRLEdBQVI7UUFDSSxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN2QyxDQUFDO0lBRVMseUJBQU0sR0FBaEIsVUFBaUIsRUFBVTtJQUMzQixDQUFDO0lBaENEO1FBREMsUUFBUSxDQUFDLEtBQUssQ0FBQzsrQ0FDVztJQUczQjtRQURDLFFBQVEsQ0FBQyxFQUFFLENBQUM7dURBQ3VCO0lBR3BDO1FBREMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxLQUFLLENBQUM7aURBQ1U7SUFUWixRQUFRO1FBRDVCLE9BQU87T0FDYSxRQUFRLENBb0M1QjtJQUFELGVBQUM7Q0FwQ0QsQUFvQ0MsQ0FwQ3FDLEVBQUUsQ0FBQyxTQUFTLEdBb0NqRDtrQkFwQ29CLFFBQVEiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyJcclxuY29uc3Qge2NjY2xhc3MsIHByb3BlcnR5LCByZXF1aXJlQ29tcG9uZW50fSA9IGNjLl9kZWNvcmF0b3I7XHJcblxyXG5AY2NjbGFzc1xyXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBOZXdDbGFzcyBleHRlbmRzIGNjLkNvbXBvbmVudCB7XHJcblxyXG4gICAgQHByb3BlcnR5KGZhbHNlKVxyXG4gICAgbG9jYWxUZXN0OiBib29sZWFuID0gZmFsc2U7XHJcblxyXG4gICAgQHByb3BlcnR5KFwiXCIpXHJcbiAgICBjbGllbnRUZXN0VmVyc2lvbjogc3RyaW5nID0gXCIxLjAuMFwiO1xyXG5cclxuICAgIEBwcm9wZXJ0eShjYy5MYWJlbClcclxuICAgIHRlc3RWZXJzaW9uOiBjYy5MYWJlbCA9IG51bGw7XHJcblxyXG4gICAgc3RhcnQgKCkge1xyXG4gICAgICAgIGNjLmRlYnVnLnNldERpc3BsYXlTdGF0cyhmYWxzZSk7XHJcbiAgICAgICAgd2luZG93LmluaXRNZ3IoKTtcclxuICAgICAgICBjYy5meC5HYW1lQ29uZmlnLmluaXQodGhpcy5sb2NhbFRlc3QpO1xyXG4gICAgICAgIC8vIGNjLmZ4LkF1ZGlvTWFuYWdlci5JbnN0YW5jZS5pbml0KCk7XHJcbiAgICAgICAgdGhpcy50ZXN0VmVyc2lvbi5zdHJpbmcgPSB0aGlzLmNsaWVudFRlc3RWZXJzaW9uO1xyXG4gICAgfVxyXG5cclxuICAgIC8v5byA5aeL5ri45oiP77yM6Lez6L2s6Iez5byV5a+86aG16Z2iXHJcbiAgICBzdGFydEdhbWUoKXtcclxuICAgICAgICBjYy5kaXJlY3Rvci5sb2FkU2NlbmUoXCJHYW1lU2NlbmVcIik7XHJcbiAgICAgICAgLy8gY2MuZGlyZWN0b3IubG9hZFNjZW5lKFwiR3VpZGVTY2VuZVwiKTtcclxuICAgIH1cclxuICAgIC8v5aSH55So77yM55So5p2l5rWL6K+V6Lez6L2sIOaMh+WumuWFs+WNoVxyXG4gICAgY2xpY2tCdG4oZXZlbnQsZGF0YSl7XHJcbiAgICAgICAgY2MuZnguR2FtZUNvbmZpZy5HTV9JTkZPLmN1c3RvbSA9IHBhcnNlSW50KGRhdGEpO1xyXG4gICAgICAgIGNjLmRpcmVjdG9yLmxvYWRTY2VuZShcIkdhbWVTY2VuZVwiKTtcclxuICAgIH0gICBcclxuICAgIC8v5omT5byA5o6S6KGM5qacXHJcbiAgICBvcGVuUmFuaygpe1xyXG4gICAgICAgIGNjLmRpcmVjdG9yLmxvYWRTY2VuZShcIlJhbmtTY2VuZVwiKTtcclxuICAgIH1cclxuICAgIFxyXG4gICAgcHJvdGVjdGVkIHVwZGF0ZShkdDogbnVtYmVyKTogdm9pZCB7XHJcbiAgICB9XHJcbn1cclxuIl19
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxMb2FkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNNLElBQUEsS0FBd0MsRUFBRSxDQUFDLFVBQVUsRUFBcEQsT0FBTyxhQUFBLEVBQUUsUUFBUSxjQUFBLEVBQUUsZ0JBQWdCLHNCQUFpQixDQUFDO0FBRzVEO0lBQXNDLDRCQUFZO0lBQWxEO1FBQUEscUVBaURDO1FBOUNHLGVBQVMsR0FBWSxLQUFLLENBQUM7UUFHM0IsdUJBQWlCLEdBQVcsT0FBTyxDQUFDO1FBR3BDLGlCQUFXLEdBQWEsSUFBSSxDQUFDOztJQXdDakMsQ0FBQztJQXRDRyx3QkFBSyxHQUFMO1FBQ0ksRUFBRSxDQUFDLEtBQUssQ0FBQyxlQUFlLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDaEMsTUFBTSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ2pCLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUM7UUFDdEMsc0NBQXNDO1FBQ3RDLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxpQkFBaUIsQ0FBQztRQUNqRCxJQUFJLE1BQU0sR0FBRyxNQUFNLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQztRQUNsQyxJQUFHLElBQUksQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLEVBQUM7WUFDMUIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztZQUNyQixJQUFJLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxNQUFNLEdBQUcsS0FBSyxDQUFDO1NBQ25EO2FBQ0c7WUFDQSxPQUFPLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1NBQ3hCO0lBQ0wsQ0FBQztJQUVELE1BQU07SUFDTixnQ0FBYSxHQUFiLFVBQWMsR0FBRztRQUNiLE9BQU8sYUFBYSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUNuQyxDQUFDO0lBRUQsY0FBYztJQUNkLDRCQUFTLEdBQVQ7UUFDSSxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztRQUNuQyx1Q0FBdUM7SUFDM0MsQ0FBQztJQUNELGdCQUFnQjtJQUNoQiwyQkFBUSxHQUFSLFVBQVMsS0FBSyxFQUFDLElBQUk7UUFDZixFQUFFLENBQUMsRUFBRSxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsTUFBTSxHQUFHLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNqRCxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN2QyxDQUFDO0lBQ0QsT0FBTztJQUNQLDJCQUFRLEdBQVI7UUFDSSxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN2QyxDQUFDO0lBRVMseUJBQU0sR0FBaEIsVUFBaUIsRUFBVTtJQUMzQixDQUFDO0lBN0NEO1FBREMsUUFBUSxDQUFDLEtBQUssQ0FBQzsrQ0FDVztJQUczQjtRQURDLFFBQVEsQ0FBQyxFQUFFLENBQUM7dURBQ3VCO0lBR3BDO1FBREMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxLQUFLLENBQUM7aURBQ1U7SUFUWixRQUFRO1FBRDVCLE9BQU87T0FDYSxRQUFRLENBaUQ1QjtJQUFELGVBQUM7Q0FqREQsQUFpREMsQ0FqRHFDLEVBQUUsQ0FBQyxTQUFTLEdBaURqRDtrQkFqRG9CLFFBQVEiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyJcclxuY29uc3Qge2NjY2xhc3MsIHByb3BlcnR5LCByZXF1aXJlQ29tcG9uZW50fSA9IGNjLl9kZWNvcmF0b3I7XHJcblxyXG5AY2NjbGFzc1xyXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBOZXdDbGFzcyBleHRlbmRzIGNjLkNvbXBvbmVudCB7XHJcblxyXG4gICAgQHByb3BlcnR5KGZhbHNlKVxyXG4gICAgbG9jYWxUZXN0OiBib29sZWFuID0gZmFsc2U7XHJcblxyXG4gICAgQHByb3BlcnR5KFwiXCIpXHJcbiAgICBjbGllbnRUZXN0VmVyc2lvbjogc3RyaW5nID0gXCIxLjAuMFwiO1xyXG5cclxuICAgIEBwcm9wZXJ0eShjYy5MYWJlbClcclxuICAgIHRlc3RWZXJzaW9uOiBjYy5MYWJlbCA9IG51bGw7XHJcblxyXG4gICAgc3RhcnQgKCkge1xyXG4gICAgICAgIGNjLmRlYnVnLnNldERpc3BsYXlTdGF0cyhmYWxzZSk7XHJcbiAgICAgICAgd2luZG93LmluaXRNZ3IoKTtcclxuICAgICAgICBjYy5meC5HYW1lQ29uZmlnLmluaXQodGhpcy5sb2NhbFRlc3QpO1xyXG4gICAgICAgIC8vIGNjLmZ4LkF1ZGlvTWFuYWdlci5JbnN0YW5jZS5pbml0KCk7XHJcbiAgICAgICAgdGhpcy50ZXN0VmVyc2lvbi5zdHJpbmcgPSB0aGlzLmNsaWVudFRlc3RWZXJzaW9uO1xyXG4gICAgICAgIHZhciB1cmxOb3cgPSB3aW5kb3cubG9jYXRpb24uaHJlZjtcclxuICAgICAgICBpZih0aGlzLmNvbnRhaW5zVHJhaW4odXJsTm93KSl7XHJcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKFwi5peg5o6S6KGM54mI5pysXCIpO1xyXG4gICAgICAgICAgICB0aGlzLm5vZGUuZ2V0Q2hpbGRCeU5hbWUoXCJSYW5rXCIpLmFjdGl2ZSA9IGZhbHNlO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNle1xyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyhcIuacieaOkuihjOeJiOacrFwiKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgLy/liKTmlq3mnaXmupBcclxuICAgIGNvbnRhaW5zVHJhaW4oc3RyKSB7XHJcbiAgICAgICAgcmV0dXJuIC9mcm9tPXRyYWluL2kudGVzdChzdHIpO1xyXG4gICAgfVxyXG5cclxuICAgIC8v5byA5aeL5ri45oiP77yM6Lez6L2s6Iez5byV5a+86aG16Z2iXHJcbiAgICBzdGFydEdhbWUoKXtcclxuICAgICAgICBjYy5kaXJlY3Rvci5sb2FkU2NlbmUoXCJHYW1lU2NlbmVcIik7XHJcbiAgICAgICAgLy8gY2MuZGlyZWN0b3IubG9hZFNjZW5lKFwiR3VpZGVTY2VuZVwiKTtcclxuICAgIH1cclxuICAgIC8v5aSH55So77yM55So5p2l5rWL6K+V6Lez6L2sIOaMh+WumuWFs+WNoVxyXG4gICAgY2xpY2tCdG4oZXZlbnQsZGF0YSl7XHJcbiAgICAgICAgY2MuZnguR2FtZUNvbmZpZy5HTV9JTkZPLmN1c3RvbSA9IHBhcnNlSW50KGRhdGEpO1xyXG4gICAgICAgIGNjLmRpcmVjdG9yLmxvYWRTY2VuZShcIkdhbWVTY2VuZVwiKTtcclxuICAgIH0gICBcclxuICAgIC8v5omT5byA5o6S6KGM5qacXHJcbiAgICBvcGVuUmFuaygpe1xyXG4gICAgICAgIGNjLmRpcmVjdG9yLmxvYWRTY2VuZShcIlJhbmtTY2VuZVwiKTtcclxuICAgIH1cclxuICAgIFxyXG4gICAgcHJvdGVjdGVkIHVwZGF0ZShkdDogbnVtYmVyKTogdm9pZCB7XHJcbiAgICB9XHJcbn1cclxuIl19
|
1106
temp/quick-scripts/dst/assets/Script/Sdk/MiniGameSdk.js
Normal file
|
@ -9,6 +9,7 @@ require('./assets/Script/Load');
|
|||
require('./assets/Script/Map');
|
||||
require('./assets/Script/Mask');
|
||||
require('./assets/Script/RankManager');
|
||||
require('./assets/Script/Sdk/MiniGameSdk');
|
||||
require('./assets/Script/Window');
|
||||
require('./assets/Script/module/Config/GameConfig');
|
||||
require('./assets/Script/module/Crypto/HttpUtil');
|
||||
|
|
|
@ -80,6 +80,13 @@ var NewClass = /** @class */ (function (_super) {
|
|||
};
|
||||
NewClass.prototype.start = function () {
|
||||
};
|
||||
/**
|
||||
* 息壤过后改变修筑路径
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param number 息壤执行长度,改变息壤用后其他路径的X或Y值
|
||||
* @param direction 只为两个方向,横向false,纵向true
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
//初始化地图块数据
|
||||
NewClass.prototype.initData = function (type, pos, max) {
|
||||
this.block_Type = type;
|
||||
|
@ -88,9 +95,9 @@ var NewClass = /** @class */ (function (_super) {
|
|||
if (type == cc.Enum(BlockType).Start) {
|
||||
var bg = this.node.getChildByName("sp");
|
||||
// this.node.getComponent(cc.Sprite).spriteFrame = null;
|
||||
bg.getComponent(cc.Sprite).spriteFrame = this.UI["_spriteFrames"]["start"];
|
||||
// bg.getComponent(cc.Sprite).spriteFrame = this.UI["_spriteFrames"]["start"];
|
||||
if (cc.fx.GameConfig.GM_INFO.level > 3) {
|
||||
bg.getChildByName("start").y = 20;
|
||||
// bg.getChildByName("start").y = 20;
|
||||
bg.getChildByName("end").y = 20;
|
||||
}
|
||||
this.rotateTarget(bg, "start", pos, max);
|
||||
|
@ -100,7 +107,7 @@ var NewClass = /** @class */ (function (_super) {
|
|||
// this.node.getComponent(cc.Sprite).spriteFrame = null;
|
||||
bg.getComponent(cc.Sprite).spriteFrame = this.UI["_spriteFrames"]["end"];
|
||||
if (cc.fx.GameConfig.GM_INFO.level > 3) {
|
||||
bg.getChildByName("start").y = 20;
|
||||
// bg.getChildByName("start").y = 20;
|
||||
bg.getChildByName("end").y = 20;
|
||||
}
|
||||
this.rotateTarget(bg, "end", pos, max);
|
||||
|
@ -285,11 +292,13 @@ var NewClass = /** @class */ (function (_super) {
|
|||
//息壤具体执行方法 外部可调用
|
||||
NewClass.prototype.set_Xi_SoilType = function (direction, end, name) {
|
||||
var _this = this;
|
||||
// console.log("息壤",direction,name,this.block_Type);
|
||||
// console.log("息壤",direction,name,end);
|
||||
var jg = this.repeatRoad(true, direction);
|
||||
console.log("息壤重复判断结果", jg);
|
||||
if (jg == true)
|
||||
if (jg == true) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
return;
|
||||
}
|
||||
if (this.block_Type == cc.Enum(BlockType).Start) {
|
||||
this.set_Xi_Soil(direction, false);
|
||||
return;
|
||||
|
@ -351,7 +360,6 @@ var NewClass = /** @class */ (function (_super) {
|
|||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
}
|
||||
else if (this.node.getChildByName("turn2").active == true && this.block_Type != cc.Enum(BlockType).Xi_Soil) {
|
||||
|
@ -359,24 +367,25 @@ var NewClass = /** @class */ (function (_super) {
|
|||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
}
|
||||
if (direction) {
|
||||
if (this.node.getChildByName("vertical2").active == true && this.block_Type == cc.Enum(BlockType).Xi_Soil && (direction == "up" || direction == "down")) {
|
||||
// alert("治水失败");
|
||||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
if (this.node.getChildByName("vertical2").angle == 0 || this.node.getChildByName("vertical2").angle == 180) {
|
||||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this.node.getChildByName("horizontal2").active == true && this.block_Type == cc.Enum(BlockType).Xi_Soil && (direction == "right" || direction == "left")) {
|
||||
else if (this.node.getChildByName("vertical2").active == true && this.block_Type == cc.Enum(BlockType).Xi_Soil && (direction == "right" || direction == "left")) {
|
||||
// alert("治水失败");
|
||||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
if (this.node.getChildByName("vertical2").angle == 90 || this.node.getChildByName("vertical2").angle == 270) {
|
||||
jg = true;
|
||||
if (type) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -495,7 +504,6 @@ var NewClass = /** @class */ (function (_super) {
|
|||
target = this.node.getChildByName("Reinforce");
|
||||
if (this.block_Type == cc.Enum(BlockType).Peak) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
return;
|
||||
}
|
||||
if (this.block_Type != cc.Enum(BlockType).End)
|
||||
|
@ -547,7 +555,7 @@ var NewClass = /** @class */ (function (_super) {
|
|||
else if (this.pos.y - posTemp.y >= 1) {
|
||||
direction = "down";
|
||||
}
|
||||
console.log("结束方向:", direction);
|
||||
// console.log("结束方向:",direction);
|
||||
if (!this.finishi) {
|
||||
this.finishi = true;
|
||||
this.set_Xi_Soil(direction, true);
|
||||
|
@ -597,14 +605,12 @@ var NewClass = /** @class */ (function (_super) {
|
|||
if (this.node.getChildByName("vertical").active == true && this.node.getChildByName("horizontal").active == true) {
|
||||
// alert("治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
// cc.director.loadScene("GameScene");
|
||||
return;
|
||||
}
|
||||
else if (this.node.getChildByName("turn").active == true && this.block_Type != cc.Enum(BlockType).Xi_Soil) {
|
||||
// alert("治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
// cc.director.loadScene("GameScene");
|
||||
return;
|
||||
}
|
||||
|
@ -722,7 +728,6 @@ var NewClass = /** @class */ (function (_super) {
|
|||
.call(function () {
|
||||
// alert("治水成功");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "win");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, true);
|
||||
if (cc.fx.GameConfig.GM_INFO.level < 7) {
|
||||
cc.fx.GameConfig.GM_INFO.level += 1;
|
||||
}
|
||||
|
@ -752,7 +757,6 @@ var NewClass = /** @class */ (function (_super) {
|
|||
.call(function () {
|
||||
// alert("治水失败")
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
// cc.director.loadScene("GameScene");
|
||||
})
|
||||
.start();
|
||||
|
|
|
@ -49,14 +49,15 @@ var NewClass = /** @class */ (function (_super) {
|
|||
this.canTouch = true;
|
||||
this.Reinforce = false;
|
||||
this.Soil = false;
|
||||
this.mapHeight = 0;
|
||||
};
|
||||
NewClass.prototype.setPosition = function (tip) {
|
||||
tip.setPosition(30, -35);
|
||||
tip.setPosition(30, -25);
|
||||
if (this.tipArray.length > 0) {
|
||||
var length = this.tipArray.length + 1;
|
||||
var posY = Math.ceil(length / 8) - 1;
|
||||
var posX = length - Math.floor(posY) * 8 - 1;
|
||||
tip.setPosition(30 + 48 * posX, -35 - 48 * posY);
|
||||
tip.setPosition(30 + 48 * posX, -25 - 48 * posY + this.mapHeight);
|
||||
}
|
||||
};
|
||||
//清空所有
|
||||
|
@ -76,6 +77,7 @@ var NewClass = /** @class */ (function (_super) {
|
|||
var drawingReset = cc.fx.GameConfig.CLICK_DATA.drawingReset + 1;
|
||||
cc.fx.GameConfig.CLICK_SET("drawingReset", drawingReset);
|
||||
cc.fx.Notifications.emit(cc.fx.Message.removeTip, "remove");
|
||||
this.mapHeight = 0;
|
||||
}
|
||||
};
|
||||
//撤回一步
|
||||
|
@ -93,6 +95,11 @@ var NewClass = /** @class */ (function (_super) {
|
|||
var drawingBack = cc.fx.GameConfig.CLICK_DATA.drawingBack + 1;
|
||||
cc.fx.GameConfig.CLICK_SET("drawingBack", drawingBack);
|
||||
cc.fx.Notifications.emit(cc.fx.Message.removeTip, "back");
|
||||
if (this.tipArray.length >= 24) {
|
||||
if ((this.tipArray.length) % 8 == 0) {
|
||||
this.mapMove(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
//点击事件
|
||||
|
@ -158,6 +165,25 @@ var NewClass = /** @class */ (function (_super) {
|
|||
this.setPosition(tip);
|
||||
this.tipArray.push(tip);
|
||||
this.controlArray.push(data);
|
||||
if (this.tipArray.length >= 25) {
|
||||
if ((this.tipArray.length - 1) % 8 == 0) {
|
||||
this.mapMove(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
//地图放不下了上下移动
|
||||
NewClass.prototype.mapMove = function (type) {
|
||||
if (type)
|
||||
this.mapHeight += 48;
|
||||
else
|
||||
this.mapHeight -= 48;
|
||||
for (var i = 0; i < this.tipArray.length; i++) {
|
||||
var tip = this.tipArray[i];
|
||||
if (type)
|
||||
tip.y += 48;
|
||||
else
|
||||
tip.y -= 48;
|
||||
}
|
||||
};
|
||||
//点击开始 创建河道
|
||||
NewClass.prototype.start_Click = function () {
|
||||
|
|
|
@ -46,14 +46,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
};
|
||||
//处理地图数据 第一关完全随机,从第二关开始,赢了根据5秒洪峰来临增加难度步数,输了当前难度减步数
|
||||
GameManager.prototype.getMap = function () {
|
||||
// var temp = [];
|
||||
// for(let k=0; k<cc.fx.GameConfig.LEVEL_INFO.length; k++){
|
||||
// temp[k] = [];
|
||||
// for(let j=0; j<cc.fx.GameConfig.LEVEL_INFO[k].length; j++){
|
||||
// temp[k].push(cc.fx.GameConfig.LEVEL_INFO[k][j].min_steps);
|
||||
// }
|
||||
// }
|
||||
// console.log(temp);
|
||||
var custom = 0;
|
||||
var map = [];
|
||||
if (cc.fx.GameConfig.GM_INFO.level == 1) {
|
||||
|
@ -72,14 +64,19 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
var random = Math.floor(Math.random() * map.length);
|
||||
custom = map[random];
|
||||
console.log(custom, map);
|
||||
// console.log(custom,map);
|
||||
}
|
||||
//记录当前最小步数
|
||||
cc.fx.GameConfig.GM_INFO.min_Steps = cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][custom].min_steps;
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = 0;
|
||||
return custom;
|
||||
};
|
||||
//获取下一关难度,步数增加2或者1,如果没有则降到有.
|
||||
/**
|
||||
* 获取下一关难度,步数增加2或者1,如果没有则降到有.
|
||||
* @param arr 配置里读取,当前(x*x)地图等级内所有地图数组
|
||||
* @param min_steps 最佳步数,下一关难度或者输了降难度,根据最佳步数增加或者减少。
|
||||
* @param type true为增加步数,false为输了降低难度步数
|
||||
*/
|
||||
GameManager.prototype.getMapArray = function (arr, min_steps, type) {
|
||||
var map = [];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
|
@ -112,6 +109,9 @@ var GameManager = /** @class */ (function (_super) {
|
|||
this.replaceTime = 0;
|
||||
this.startTime = cc.fx.GameTool.getTime();
|
||||
this.countTime = cc.fx.GameConfig.TIME_INFO.totalTime;
|
||||
if (this.countTime == 0) {
|
||||
this.gameOver();
|
||||
}
|
||||
this.waterTime = cc.fx.GameConfig.TIME_INFO.waterTime[cc.fx.GameConfig.GM_INFO.level];
|
||||
// if(this.countTime < this.waterTime) this.replaceTime = this.countTime;
|
||||
this.Time.string = cc.fx.GameTool.getTimeMargin(this.countTime);
|
||||
|
@ -155,13 +155,14 @@ var GameManager = /** @class */ (function (_super) {
|
|||
else if (!cc.fx.GameConfig.GM_INFO.guide) {
|
||||
this.custom = this.getMap();
|
||||
}
|
||||
console.log(this.custom);
|
||||
// this.custom = 7;
|
||||
// console.log(this.custom);
|
||||
var arr = cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][this.custom].map;
|
||||
if (cc.fx.GameConfig.GM_INFO.level == 0) {
|
||||
this.Map.scale = 1.2;
|
||||
}
|
||||
this.node.getChildByName("Top").getChildByName("id").getComponent(cc.Label).string =
|
||||
cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][this.custom].id;
|
||||
cc.fx.GameConfig.GM_INFO.score;
|
||||
//将地图x,y轴切换
|
||||
this.map_Array = arr[0].map(function (item, i) {
|
||||
return arr.map(function (val) { return val[i]; });
|
||||
|
@ -184,7 +185,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
}
|
||||
};
|
||||
//开始后,按玩家操作,将路径中地图块放入数组中
|
||||
/**
|
||||
* 开始后,按玩家操作,将路径中地图块放入数组中
|
||||
* @param data 根据当前操作,添加建筑地图数组
|
||||
*/
|
||||
GameManager.prototype.setMap = function (data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var start = this.path_Array[this.path_Array.length - 1];
|
||||
|
@ -214,7 +218,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
this.runRoad(0);
|
||||
};
|
||||
//开始执行洪峰来了的动画
|
||||
/**
|
||||
* 开始执行洪峰来了的动画
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
*/
|
||||
GameManager.prototype.runRoad = function (order) {
|
||||
var _this = this;
|
||||
order = parseInt(order);
|
||||
|
@ -246,7 +253,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
setTimeout(function () {
|
||||
if (!_this.plan_over) {
|
||||
_this.plan_over = true;
|
||||
_this.unschedule(_this.updateWaterTime);
|
||||
var head = _this.node.getChildByName("Top").getChildByName("head");
|
||||
var progress = _this.node.getChildByName("Top").getChildByName("progress").getComponent(cc.Sprite);
|
||||
head.stopAllActions();
|
||||
|
@ -261,7 +267,7 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
else {
|
||||
direction = "err";
|
||||
console.log("进入结束err");
|
||||
// console.log("进入结束err");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -274,7 +280,8 @@ var GameManager = /** @class */ (function (_super) {
|
|||
direction = "Xi_Soil";
|
||||
}
|
||||
else if (this.path_Array[order + 1].z == 6 && order == 0 && order + 1 < this.path_Array.length) {
|
||||
direction = this.getDirection(order + 1, this.path_Array);
|
||||
// direction = this.getDirection(order+1,this.path_Array);
|
||||
direction = this.getDirection(order, this.path_Array);
|
||||
}
|
||||
else {
|
||||
direction = this.getDirection(order, this.path_Array);
|
||||
|
@ -290,7 +297,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
// if(direction == "" || jg == false) return;
|
||||
if (direction == "err" || direction == "" || jg == false) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
return;
|
||||
}
|
||||
if (i < 0 || i > (this.block_Array.length - 1)) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
return;
|
||||
}
|
||||
var target = this.block_Array[i].getComponent("Block");
|
||||
|
@ -325,7 +335,14 @@ var GameManager = /** @class */ (function (_super) {
|
|||
target.runRoad(data);
|
||||
}
|
||||
};
|
||||
//判断边界。或者撞山,或者湿地没有加固
|
||||
/**
|
||||
* 判断边界。或者撞山,或者湿地没有加固
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param x 当前操作地块横坐标
|
||||
* @param y 当前操作地块纵坐标
|
||||
* @param direction 当前操作方向,若不是方向则为息壤或者加固
|
||||
* @param road 建筑地图数组,可理解为路径数组,path_Array
|
||||
*/
|
||||
GameManager.prototype.getBoundary = function (order, x, y, direction, road) {
|
||||
var jg = true;
|
||||
if (x < 0 || x >= this.map_Width || y < 0 || y >= this.map_Hight) {
|
||||
|
@ -333,7 +350,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
// console.log("超过边界,游戏结束");
|
||||
// alert("超过边界,治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
else {
|
||||
var i = road[order].x * this.map_Array[0].length + road[order].y;
|
||||
|
@ -343,19 +359,20 @@ var GameManager = /** @class */ (function (_super) {
|
|||
// console.log("修筑山峰,游戏结束");
|
||||
// alert("修筑山峰,治水失败");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
else if (target.block_Type == 2 && direction != "Reinforce") {
|
||||
jg = false;
|
||||
// console.log("修筑未加固湿地,游戏结束");
|
||||
// alert("修筑未加固湿地,游戏结束");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
}
|
||||
return jg;
|
||||
};
|
||||
//开始执行洪峰来了的动画
|
||||
/**
|
||||
* 开始执行洪峰来了的动画
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
*/
|
||||
GameManager.prototype.runWater = function (order) {
|
||||
order = parseInt(order);
|
||||
if (order <= this.water_Array.length - 1) {
|
||||
|
@ -390,7 +407,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var jg = this.getBoundary(order, this.water_Array[order].x, this.water_Array[order].y, direction, this.water_Array);
|
||||
if (direction == "" || jg == false || direction == "err") {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
return;
|
||||
}
|
||||
var target = this.block_Array[i].getComponent("Block");
|
||||
|
@ -425,7 +441,11 @@ var GameManager = /** @class */ (function (_super) {
|
|||
target.runWater(data);
|
||||
}
|
||||
};
|
||||
//获取息壤的格子的方向
|
||||
/**
|
||||
* 获取息壤的格子的方向
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
GameManager.prototype.getXi_Soil = function (order, road) {
|
||||
var direction = null;
|
||||
//如果息壤后面还有下一步的话
|
||||
|
@ -446,12 +466,18 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
return direction;
|
||||
};
|
||||
//设置息壤
|
||||
/**
|
||||
* 设置息壤执行方法
|
||||
* @param order 建筑地图数组里的执行的序列号,依次往下加
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
* @param name road或者water,建筑路径或者洪峰路径
|
||||
*/
|
||||
GameManager.prototype.set_Soil = function (order, road, name) {
|
||||
var direction = this.getXi_Soil(order, road);
|
||||
var length = 0;
|
||||
if (direction == "right") {
|
||||
length = this.map_Width - 1;
|
||||
// let temp = this.map_Width - 1;
|
||||
for (var i = road[order].x; i <= length; i++) {
|
||||
var n = i * this.map_Array[0].length + road[order].y;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
|
@ -464,7 +490,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
this.scheduleOnce;
|
||||
}
|
||||
else if (direction == "left") {
|
||||
length = 0;
|
||||
|
@ -511,8 +536,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// if(length == 0){
|
||||
// }
|
||||
this.soil_Find(direction, order, length, road, name);
|
||||
};
|
||||
//查找息壤蛮遗憾路径
|
||||
|
@ -523,8 +546,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = i * this.map_Array[0].length + road[order].y;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
if (i == start) {
|
||||
if (i == start && i == length)
|
||||
if (i == start && i == length) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), order, name);
|
||||
}
|
||||
else
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), null, name);
|
||||
var value = cc.v3(this.path_Array[order].x, this.path_Array[order].y, 0);
|
||||
|
@ -549,8 +574,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = i * this.map_Array[0].length + road[order].y;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
if (i == start) {
|
||||
if (i == start && i == length)
|
||||
if (i == start && i == length) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), order, name);
|
||||
}
|
||||
else
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), null, name);
|
||||
var value = cc.v3(this.path_Array[order].x, this.path_Array[order].y, 0);
|
||||
|
@ -576,10 +603,13 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = road[order].x * this.map_Array[0].length + i;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
if (i == start) {
|
||||
if (i == start && i == length)
|
||||
if (i == start && i == length) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), order, name);
|
||||
else
|
||||
}
|
||||
else {
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), null, name);
|
||||
}
|
||||
var value = cc.v3(this.path_Array[order].x, this.path_Array[order].y, 0);
|
||||
if (this.water_Array[this.water_Array.length - 1] != value) {
|
||||
// console.log("特别插入:",this.path_Array[order].x,this.path_Array[order].y);
|
||||
|
@ -604,8 +634,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = road[order].x * this.map_Array[0].length + i;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
if (i == start) {
|
||||
if (i == start && i == length)
|
||||
if (i == start && i == length) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), order, name);
|
||||
}
|
||||
else
|
||||
target.set_Xi_SoilType(this.getDirection(order, road), null, name);
|
||||
var value = cc.v3(this.path_Array[order].x, this.path_Array[order].y, 0);
|
||||
|
@ -626,7 +658,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
}
|
||||
};
|
||||
//改变水流地图
|
||||
/**
|
||||
* 改变水流地图
|
||||
* @param value 需要根据使用息壤情况,插入到洪峰路径的点
|
||||
*/
|
||||
GameManager.prototype.changeWater = function (value) {
|
||||
var jg = true;
|
||||
if (this.water_Array.length > 0) {
|
||||
|
@ -637,7 +672,13 @@ var GameManager = /** @class */ (function (_super) {
|
|||
if (jg)
|
||||
this.water_Array.push(value);
|
||||
};
|
||||
//息壤过后改变修筑路径
|
||||
/**
|
||||
* 息壤过后改变修筑路径
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param number 息壤执行长度,改变息壤用后其他路径的X或Y值
|
||||
* @param direction 只为两个方向,横向false,纵向true
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
GameManager.prototype.changePath = function (order, number, direction, road) {
|
||||
for (var i = (order + 1); i < road.length; i++) {
|
||||
if (!direction) {
|
||||
|
@ -676,11 +717,17 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
}
|
||||
};
|
||||
//获取洪峰方向
|
||||
/**
|
||||
* 获取洪峰方向
|
||||
* @param order 建筑地图数组里的执行的序列号
|
||||
* @param road 建筑地图数组或者洪峰路径数组,可理解为路径数组,path_Array water_Array
|
||||
*/
|
||||
GameManager.prototype.getDirection = function (order, road) {
|
||||
var name = "";
|
||||
//入海口比较复杂单独判断
|
||||
if (order == 0) {
|
||||
if (this.path_Array[order + 1].z == 6 && road == this.path_Array)
|
||||
order += 1;
|
||||
var nextX = road[order + 1].x - road[order].x;
|
||||
var nextY = road[order].y - road[order + 1].y;
|
||||
//在底边
|
||||
|
@ -842,8 +889,12 @@ var GameManager = /** @class */ (function (_super) {
|
|||
GameManager.prototype.backScene = function () {
|
||||
cc.director.loadScene("LoadScene");
|
||||
};
|
||||
//开始游戏
|
||||
/**
|
||||
* 开始修筑
|
||||
* @param data 记录操作的数组
|
||||
*/
|
||||
GameManager.prototype.startGame = function (data) {
|
||||
this.unschedule(this.updateWaterTime);
|
||||
for (var i = 0; i < this.block_Array.length; i++) {
|
||||
this.block_Array[i].getChildByName("tipWin").active = false;
|
||||
this.block_Array[i].getChildByName("tipLose").active = false;
|
||||
|
@ -866,7 +917,10 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var arr = this.changeStep(data);
|
||||
cc.fx.GameConfig.CLICK_SET("stepList", arr);
|
||||
};
|
||||
//用于埋点记录
|
||||
/**
|
||||
* 用于埋点记录 转变方向名称为埋点所需要格式
|
||||
* @param data 记录操作的数组
|
||||
*/
|
||||
GameManager.prototype.changeStep = function (data) {
|
||||
var arr = [];
|
||||
if (data.length > 0) {
|
||||
|
@ -901,7 +955,6 @@ var GameManager = /** @class */ (function (_super) {
|
|||
setTimeout(function () {
|
||||
if (_this.water_Array.length == 0) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.showResult, "lose");
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, false);
|
||||
}
|
||||
else {
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = _this.waterTime;
|
||||
|
@ -928,13 +981,13 @@ var GameManager = /** @class */ (function (_super) {
|
|||
}
|
||||
if (this.countTime <= 0) {
|
||||
this.countTime = 0;
|
||||
this.setData(false);
|
||||
this.setData("lose");
|
||||
this.unschedule(this.updateCountDownTime);
|
||||
this.gameOver();
|
||||
}
|
||||
}
|
||||
};
|
||||
//上传每次操作数据
|
||||
//上传每次操作数据 success为成功还是失败
|
||||
GameManager.prototype.setData = function (success) {
|
||||
//设置埋点数据
|
||||
cc.fx.GameConfig.CLICK_SET("mapId", cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.level][this.custom].id);
|
||||
|
@ -943,6 +996,7 @@ var GameManager = /** @class */ (function (_super) {
|
|||
cc.fx.GameConfig.CLICK_SET("round", cc.fx.GameConfig.GM_INFO.round);
|
||||
cc.fx.GameConfig.CLICK_SET("timer", cc.fx.GameConfig.TIME_INFO.totalTime);
|
||||
cc.fx.GameConfig.CLICK_SET("cumulativeScore", cc.fx.GameConfig.GM_INFO.score);
|
||||
success = success == "lose" ? false : true;
|
||||
if (success != null) {
|
||||
cc.fx.GameConfig.CLICK_SET("success", success);
|
||||
cc.fx.GameConfig.GM_INFO.fen = this.getScore();
|
||||
|
@ -950,6 +1004,8 @@ var GameManager = /** @class */ (function (_super) {
|
|||
cc.fx.GameConfig.GM_INFO.fen = 0;
|
||||
cc.fx.GameConfig.CLICK_SET("getScore", cc.fx.GameConfig.GM_INFO.fen);
|
||||
cc.fx.GameConfig.GM_INFO.score += cc.fx.GameConfig.GM_INFO.fen;
|
||||
this.node.getChildByName("Top").getChildByName("id").getComponent(cc.Label).string =
|
||||
cc.fx.GameConfig.GM_INFO.score;
|
||||
cc.fx.GameConfig.CLICK_SET("cumulativeScore", cc.fx.GameConfig.GM_INFO.score);
|
||||
if (this.countTime != 0)
|
||||
cc.fx.GameConfig.GM_INFO.successList.push(success);
|
||||
|
@ -998,25 +1054,28 @@ var GameManager = /** @class */ (function (_super) {
|
|||
})
|
||||
.start();
|
||||
};
|
||||
//展示结果
|
||||
//展示结果 data为成功或者失败
|
||||
GameManager.prototype.showResult = function (data) {
|
||||
if (data == "lose") {
|
||||
cc.fx.AudioManager._instance.playEffect("lose", null);
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = -1;
|
||||
if (this.node.getChildByName("GameOver").active == false && this.node.getChildByName("Window").active == false) {
|
||||
cc.fx.Notifications.emit(cc.fx.Message.setData, data);
|
||||
if (data == "lose") {
|
||||
cc.fx.AudioManager._instance.playEffect("lose", null);
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = -1;
|
||||
}
|
||||
else {
|
||||
cc.fx.AudioManager._instance.playEffect("win", null);
|
||||
}
|
||||
this.node.getChildByName("Window").active = true;
|
||||
this.node.getChildByName("Window").getComponent("Window").init(data);
|
||||
}
|
||||
else {
|
||||
cc.fx.AudioManager._instance.playEffect("win", null);
|
||||
}
|
||||
this.node.getChildByName("Window").active = true;
|
||||
this.node.getChildByName("Window").getComponent("Window").init(data);
|
||||
};
|
||||
//记录反应时长,以及做步骤提示
|
||||
//记录反应时长,以及做步骤提示 data为操作名称
|
||||
GameManager.prototype.clickSun = function (data) {
|
||||
//如果没有记录过 回合开始到操作反应时长,则第一次记录, 后面不记录
|
||||
if (cc.fx.GameConfig.CLICK_DATA.startTime == 0) {
|
||||
if (cc.fx.GameConfig.CLICK_DATA.startTime == -1) {
|
||||
this.finishiTime = cc.fx.GameTool.getTime();
|
||||
var now = this.finishiTime - this.startTime;
|
||||
// console.log("startTime:",now,this.startTime);
|
||||
// console.log("startTime:",this.finishiTime);
|
||||
cc.fx.GameConfig.CLICK_SET("startTime", now);
|
||||
}
|
||||
if (cc.fx.GameConfig.GM_INFO.level > 3)
|
||||
|
@ -1066,7 +1125,7 @@ var GameManager = /** @class */ (function (_super) {
|
|||
this.tip_Array.push([n]);
|
||||
}
|
||||
};
|
||||
//提示是否错误
|
||||
//提示是否错误 只前三关有 ,pos为位置,data为操作方向
|
||||
GameManager.prototype.tipCan = function (pos, data) {
|
||||
//先判断是否出边界
|
||||
if (pos.x < 0 || pos.x > this.map_Array.length - 1 || pos.y < 0 || pos.y > this.map_Array[0].length - 1) {
|
||||
|
@ -1076,20 +1135,27 @@ var GameManager = /** @class */ (function (_super) {
|
|||
var n = pos.x * this.map_Array[0].length + pos.y;
|
||||
var target = this.block_Array[n].getComponent("Block");
|
||||
target.node.getChildByName("tipWin").active = true;
|
||||
// target.node.getChildByName("tipWin").opacity = 255;
|
||||
// target.node.getChildByName("tipLose").opacity = 255;
|
||||
//重复路回头路,或者山峰
|
||||
if (target.repeatRoad(false, null) == true || target.block_Type == 3) {
|
||||
this.tip_Array.push([cc.v3(pos.x, pos.y, 0)]);
|
||||
target.node.getChildByName("tipLose").active = true;
|
||||
target.node.getChildByName("tipWin").active = false;
|
||||
}
|
||||
//湿地 上一步如果没用息壤或者加固
|
||||
else if (target.block_Type == 2) {
|
||||
if (this.tip_Array.length > 1) {
|
||||
if (this.tip_Array.length > 0) {
|
||||
if (this.tip_Array[this.tip_Array.length - 1][0].z == 0) {
|
||||
target.node.getChildByName("tipLose").active = true;
|
||||
target.node.getChildByName("tipWin").active = false;
|
||||
}
|
||||
else if (this.tip_Array[this.tip_Array.length - 1][0].z == 2) {
|
||||
target.node.getChildByName("tipLose").active = false;
|
||||
target.node.getChildByName("tipWin").active = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
target.node.getChildByName("tipLose").active = true;
|
||||
target.node.getChildByName("tipWin").active = false;
|
||||
}
|
||||
}
|
||||
if (this.tip_Array.length > 0) {
|
||||
|
|
|
@ -64,6 +64,17 @@ var NewClass = /** @class */ (function (_super) {
|
|||
this.three.active = false;
|
||||
this.four.active = false;
|
||||
this.five.active = false;
|
||||
var urlNow = window.location.href;
|
||||
if (this.containsTrain(urlNow)) {
|
||||
this.node.getChildByName("again").active = false;
|
||||
this.node.getChildByName("back").active = false;
|
||||
this.node.getChildByName("finishi").active = true;
|
||||
}
|
||||
else {
|
||||
this.node.getChildByName("again").active = true;
|
||||
this.node.getChildByName("back").active = true;
|
||||
this.node.getChildByName("finishi").active = false;
|
||||
}
|
||||
this.getRank();
|
||||
};
|
||||
//打开排行榜
|
||||
|
@ -80,8 +91,13 @@ var NewClass = /** @class */ (function (_super) {
|
|||
cc.fx.GameConfig.GM_INFO.score = 0;
|
||||
cc.fx.GameConfig.GM_INFO.min_Steps = 0;
|
||||
cc.fx.GameConfig.GM_INFO.min_Time = 0;
|
||||
cc.fx.GameConfig.TIME_INFO.totalTime = 120;
|
||||
cc.director.loadScene("GameScene");
|
||||
};
|
||||
//判断来源
|
||||
NewClass.prototype.containsTrain = function (str) {
|
||||
return /from=train/i.test(str);
|
||||
};
|
||||
//获取排行榜
|
||||
NewClass.prototype.getRank = function () {
|
||||
var _this = this;
|
||||
|
@ -91,6 +107,11 @@ var NewClass = /** @class */ (function (_super) {
|
|||
};
|
||||
cc.fx.GameTool.getRank(dataFile, function (data) { return _this.getRankData(data); });
|
||||
};
|
||||
//打开排行榜
|
||||
NewClass.prototype.jumpFinishi = function () {
|
||||
var url = "https://train.sparkus.cn/poster/game/";
|
||||
window.location.href = url;
|
||||
};
|
||||
//设置排行信息
|
||||
NewClass.prototype.getRankData = function (data) {
|
||||
if (data) {
|
||||
|
|
|
@ -39,6 +39,18 @@ var NewClass = /** @class */ (function (_super) {
|
|||
cc.fx.GameConfig.init(this.localTest);
|
||||
// cc.fx.AudioManager.Instance.init();
|
||||
this.testVersion.string = this.clientTestVersion;
|
||||
var urlNow = window.location.href;
|
||||
if (this.containsTrain(urlNow)) {
|
||||
console.log("无排行版本");
|
||||
this.node.getChildByName("Rank").active = false;
|
||||
}
|
||||
else {
|
||||
console.log("有排行版本");
|
||||
}
|
||||
};
|
||||
//判断来源
|
||||
NewClass.prototype.containsTrain = function (str) {
|
||||
return /from=train/i.test(str);
|
||||
};
|
||||
//开始游戏,跳转至引导页面
|
||||
NewClass.prototype.startGame = function () {
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAwC,EAAE,CAAC,UAAU,EAApD,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAiB,CAAC;AAG5D;IAAsC,4BAAY;IAAlD;QAAA,qEAoCC;QAjCG,eAAS,GAAY,KAAK,CAAC;QAG3B,uBAAiB,GAAW,OAAO,CAAC;QAGpC,iBAAW,GAAa,IAAI,CAAC;;IA2BjC,CAAC;IAzBG,wBAAK,GAAL;QACI,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,sCAAsC;QACtC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACrD,CAAC;IAED,cAAc;IACd,4BAAS,GAAT;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnC,uCAAuC;IAC3C,CAAC;IACD,gBAAgB;IAChB,2BAAQ,GAAR,UAAS,KAAK,EAAC,IAAI;QACf,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjD,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IACD,OAAO;IACP,2BAAQ,GAAR;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAES,yBAAM,GAAhB,UAAiB,EAAU;IAC3B,CAAC;IAhCD;QADC,QAAQ,CAAC,KAAK,CAAC;+CACW;IAG3B;QADC,QAAQ,CAAC,EAAE,CAAC;uDACuB;IAGpC;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;iDACU;IATZ,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAoC5B;IAAD,eAAC;CApCD,AAoCC,CApCqC,EAAE,CAAC,SAAS,GAoCjD;kBApCoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property, requireComponent} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(false)\r\n localTest: boolean = false;\r\n\r\n @property(\"\")\r\n clientTestVersion: string = \"1.0.0\";\r\n\r\n @property(cc.Label)\r\n testVersion: cc.Label = null;\r\n\r\n start () {\r\n cc.debug.setDisplayStats(false);\r\n window.initMgr();\r\n cc.fx.GameConfig.init(this.localTest);\r\n // cc.fx.AudioManager.Instance.init();\r\n this.testVersion.string = this.clientTestVersion;\r\n }\r\n\r\n //开始游戏,跳转至引导页面\r\n startGame(){\r\n cc.director.loadScene(\"GameScene\");\r\n // cc.director.loadScene(\"GuideScene\");\r\n }\r\n //备用,用来测试跳转 指定关卡\r\n clickBtn(event,data){\r\n cc.fx.GameConfig.GM_INFO.custom = parseInt(data);\r\n cc.director.loadScene(\"GameScene\");\r\n } \r\n //打开排行榜\r\n openRank(){\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n \r\n protected update(dt: number): void {\r\n }\r\n}\r\n"]}
|
||||
{"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAwC,EAAE,CAAC,UAAU,EAApD,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAiB,CAAC;AAG5D;IAAsC,4BAAY;IAAlD;QAAA,qEAiDC;QA9CG,eAAS,GAAY,KAAK,CAAC;QAG3B,uBAAiB,GAAW,OAAO,CAAC;QAGpC,iBAAW,GAAa,IAAI,CAAC;;IAwCjC,CAAC;IAtCG,wBAAK,GAAL;QACI,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,sCAAsC;QACtC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC;QACjD,IAAI,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAClC,IAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAC;YAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACrB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;SACnD;aACG;YACA,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SACxB;IACL,CAAC;IAED,MAAM;IACN,gCAAa,GAAb,UAAc,GAAG;QACb,OAAO,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IAED,cAAc;IACd,4BAAS,GAAT;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnC,uCAAuC;IAC3C,CAAC;IACD,gBAAgB;IAChB,2BAAQ,GAAR,UAAS,KAAK,EAAC,IAAI;QACf,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjD,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IACD,OAAO;IACP,2BAAQ,GAAR;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAES,yBAAM,GAAhB,UAAiB,EAAU;IAC3B,CAAC;IA7CD;QADC,QAAQ,CAAC,KAAK,CAAC;+CACW;IAG3B;QADC,QAAQ,CAAC,EAAE,CAAC;uDACuB;IAGpC;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;iDACU;IATZ,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAiD5B;IAAD,eAAC;CAjDD,AAiDC,CAjDqC,EAAE,CAAC,SAAS,GAiDjD;kBAjDoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property, requireComponent} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(false)\r\n localTest: boolean = false;\r\n\r\n @property(\"\")\r\n clientTestVersion: string = \"1.0.0\";\r\n\r\n @property(cc.Label)\r\n testVersion: cc.Label = null;\r\n\r\n start () {\r\n cc.debug.setDisplayStats(false);\r\n window.initMgr();\r\n cc.fx.GameConfig.init(this.localTest);\r\n // cc.fx.AudioManager.Instance.init();\r\n this.testVersion.string = this.clientTestVersion;\r\n var urlNow = window.location.href;\r\n if(this.containsTrain(urlNow)){\r\n console.log(\"无排行版本\");\r\n this.node.getChildByName(\"Rank\").active = false;\r\n }\r\n else{\r\n console.log(\"有排行版本\");\r\n }\r\n }\r\n\r\n //判断来源\r\n containsTrain(str) {\r\n return /from=train/i.test(str);\r\n }\r\n\r\n //开始游戏,跳转至引导页面\r\n startGame(){\r\n cc.director.loadScene(\"GameScene\");\r\n // cc.director.loadScene(\"GuideScene\");\r\n }\r\n //备用,用来测试跳转 指定关卡\r\n clickBtn(event,data){\r\n cc.fx.GameConfig.GM_INFO.custom = parseInt(data);\r\n cc.director.loadScene(\"GameScene\");\r\n } \r\n //打开排行榜\r\n openRank(){\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n \r\n protected update(dt: number): void {\r\n }\r\n}\r\n"]}
|
1084
temp/quick-scripts/src/assets/Script/Sdk/MiniGameSdk.js
Normal file
|
@ -1 +0,0 @@
|
|||
{"version":3,"sources":["assets\\Script\\module\\Sdk\\DouyinEntranceView.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yBAAiD;AACjD,iDAAgD;AACxC,IAAA,OAAO,GAAe,eAAU,QAAzB,EAAE,QAAQ,GAAK,eAAU,SAAf,CAAgB;AAGzC;IAAwC,sCAAS;IAAjD;;IAuBA,CAAC;IAtBG,kCAAK,GAAL;IAEA,CAAC;IAED,mCAAM,GAAN,UAAO,SAAiB;IAExB,CAAC;IAED,yCAAY,GAAZ;QACI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,oDAAuB,GAAvB;QAEI,yBAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,UAAC,OAAgB;YAC5D,IAAI,OAAO,EAAE;gBACT,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;aACvB;iBAAM;gBACH,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;aACvB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAtBQ,kBAAkB;QAD9B,OAAO,CAAC,oBAAoB,CAAC;OACjB,kBAAkB,CAuB9B;IAAD,yBAAC;CAvBD,AAuBC,CAvBuC,cAAS,GAuBhD;AAvBY,gDAAkB","file":"","sourceRoot":"/","sourcesContent":["import { _decorator, Component, Node } from 'cc';\r\nimport { MiniGameSdk } from './Sdk/MiniGameSdk';\r\nconst { ccclass, property } = _decorator;\r\n\r\n@ccclass('DouyinEntranceView')\r\nexport class DouyinEntranceView extends Component {\r\n start() {\r\n\r\n }\r\n\r\n update(deltaTime: number) {\r\n\r\n }\r\n\r\n onCloseClick() {\r\n this.node.active = false;\r\n }\r\n\r\n onNavigateToDouyinClick() {\r\n\r\n MiniGameSdk.BytedanceSidebar.navigateToSidebar((success: boolean) => { // 跳转到抖音侧边栏\r\n if (success) {\r\n console.log('跳转成功');\r\n } else {\r\n console.log('跳转失败');\r\n }\r\n });\r\n }\r\n}\r\n"]}
|
|
@ -15,14 +15,20 @@ var GameTool = {
|
|||
var name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
|
||||
var data = JSON.parse(localStorage.getItem(name));
|
||||
if (data == "undifend" || data == null || data == "") {
|
||||
var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
|
||||
window.location.href = url;
|
||||
var urlNow = window.location.href;
|
||||
if (!this.containsTrain(urlNow)) {
|
||||
var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
else {
|
||||
cc.fx.StorageMessage.setStorage(name, data);
|
||||
cc.fx.GameConfig.GM_INFO.userId = parseInt(data.userId);
|
||||
}
|
||||
},
|
||||
containsTrain: function (str) {
|
||||
return /from=train/i.test(str);
|
||||
},
|
||||
//埋点上传
|
||||
setGameData: function () {
|
||||
//GAME_DATA 初始化 每次清零
|
||||
|
@ -37,7 +43,7 @@ var GameTool = {
|
|||
"matchId": matchId,
|
||||
"data": data
|
||||
};
|
||||
console.log("上传数据:", data);
|
||||
// console.log("上传数据:",data);
|
||||
cc.fx.HttpUtil.uploadUserLogData(postData, function () { });
|
||||
},
|
||||
//上传排行榜 type为1
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{"pid":20476}
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 3.5 KiB |