98 lines
3.5 KiB
JavaScript
98 lines
3.5 KiB
JavaScript
"use strict";
|
|
cc._RF.push(module, '2234assp7RIvpDgrnqljp2R', 'Map');
|
|
// Script/Map.ts
|
|
|
|
"use strict";
|
|
// Learn TypeScript:
|
|
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
|
|
// Learn Attribute:
|
|
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
|
|
// Learn life-cycle callbacks:
|
|
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
|
|
var __extends = (this && this.__extends) || (function () {
|
|
var extendStatics = function (d, b) {
|
|
extendStatics = Object.setPrototypeOf ||
|
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
return extendStatics(d, b);
|
|
};
|
|
return function (d, b) {
|
|
extendStatics(d, b);
|
|
function __() { this.constructor = d; }
|
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
};
|
|
})();
|
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
|
|
var NewClass = /** @class */ (function (_super) {
|
|
__extends(NewClass, _super);
|
|
function NewClass() {
|
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
}
|
|
NewClass.prototype.onLoad = function () {
|
|
};
|
|
NewClass.prototype.start = function () {
|
|
this.initMap();
|
|
};
|
|
NewClass.prototype.initMap = function () {
|
|
this.setMapInfo();
|
|
};
|
|
//根据关卡设置地图大小
|
|
NewClass.prototype.setMapInfo = function () {
|
|
switch (cc.fx.GameConfig.custom) {
|
|
case 0:
|
|
this.vertical = 4;
|
|
this.horizontal = 4;
|
|
this.passTime = 0.3;
|
|
break;
|
|
case 1:
|
|
this.vertical = 5;
|
|
this.horizontal = 5;
|
|
this.passTime = 0.25;
|
|
break;
|
|
case 2:
|
|
this.vertical = 5;
|
|
this.horizontal = 5;
|
|
this.passTime = 0.2;
|
|
break;
|
|
case 3:
|
|
this.vertical = 5;
|
|
this.horizontal = 5;
|
|
this.passTime = 0.18;
|
|
break;
|
|
case 4:
|
|
this.vertical = 6;
|
|
this.horizontal = 6;
|
|
this.passTime = 0.16;
|
|
break;
|
|
case 5:
|
|
this.vertical = 6;
|
|
this.horizontal = 7;
|
|
this.passTime = 0.14;
|
|
break;
|
|
case 6:
|
|
this.vertical = 6;
|
|
this.horizontal = 8;
|
|
this.passTime = 0.12;
|
|
break;
|
|
case 7:
|
|
this.vertical = 6;
|
|
this.horizontal = 9;
|
|
this.passTime = 0.1;
|
|
break;
|
|
}
|
|
};
|
|
NewClass = __decorate([
|
|
ccclass
|
|
], NewClass);
|
|
return NewClass;
|
|
}(cc.Component));
|
|
exports.default = NewClass;
|
|
|
|
cc._RF.pop(); |