fix:微调格式

This commit is contained in:
lizhuoyuan committed 2025-01-20 20:19:48 +08:00
1 parent 9edb0c94e9
commit 0636c0ee3f
13 files changed
+17 -17

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ actions.js:用户交互的事件的处理
"use strict";
function actions () {
function actions() {
this._init();
this.SIZE = core.__SIZE__;
this.HSIZE = core.__HALF_SIZE__;
+3 -3
View File
@@ -8,7 +8,7 @@ control.js:游戏主要逻辑控制
"use strict";
function control () {
function control() {
this._init();
}
@@ -1197,7 +1197,7 @@ control.prototype._checkBlock_repulse = function (repulse) {
repulse.forEach(function (t) {
actions.push({ "type": "move", "loc": [t[0], t[1]], "steps": [t[3]], "time": 100, "keep": true, "async": true });
});
if (actions.length>0) actions.push({ "type": "waitAsync" });
if (actions.length > 0) actions.push({ "type": "waitAsync" });
return actions;
}
@@ -1209,7 +1209,7 @@ control.prototype._checkBlock_ambush = function (ambush) {
ambush.forEach(function (t) {
actions.push({ "type": "move", "loc": [t[0], t[1]], "steps": [t[3]], "time": 100, "keep": false, "async": true });
});
if (actions.length>0) actions.push({ "type": "waitAsync" });
if (actions.length > 0) actions.push({ "type": "waitAsync" });
// 强制战斗
ambush.forEach(function (t) {
actions.push({
+1 -1
View File
@@ -6,7 +6,7 @@
"use strict";
function core () {
function core() {
this.__SIZE__ = 13;
this.__PIXELS__ = this.__SIZE__ * 32;
this.__HALF_SIZE__ = Math.floor(this.__SIZE__ / 2);
+1 -1
View File
@@ -2,7 +2,7 @@
"use strict";
function data () {
function data() {
this._init();
}
+1 -1
View File
@@ -2,7 +2,7 @@
"use strict";
function enemys () {
function enemys() {
this._init();
}
+1 -1
View File
@@ -2,7 +2,7 @@
"use strict";
function events () {
function events() {
this._init();
}
+1 -1
View File
@@ -6,7 +6,7 @@ extensions.js:负责拓展插件
"use strict";
function extensions () {
function extensions() {
}
+1 -1
View File
@@ -2,7 +2,7 @@
"use strict";
function icons () {
function icons() {
this._init();
}
+1 -1
View File
@@ -2,7 +2,7 @@
"use strict";
function items () {
function items() {
this._init();
}
+1 -1
View File
@@ -6,7 +6,7 @@ loader.js:负责对资源的加载
*/
"use strict";
function loader () {
function loader() {
this._init();
}
+1 -1
View File
@@ -2,7 +2,7 @@
"use strict";
function maps () {
function maps() {
this._init();
}
+1 -1
View File
@@ -8,7 +8,7 @@
"use strict";
function ui () {
function ui() {
this._init();
// for convenience
this.SIZE = core.__SIZE__;
+3 -3
View File
@@ -7,7 +7,7 @@ utils.js 工具类
"use strict";
function utils () {
function utils() {
this._init();
this.scan = {
'up': { 'x': 0, 'y': -1 },
@@ -1351,7 +1351,7 @@ utils.prototype.http = function (type, url, formData, success, error, mimeType,
// LZW-compress
// https://gist.github.com/revolunet/843889
function lzw_encode (s) {
function lzw_encode(s) {
var dict = {};
var data = (s + "").split("");
var out = [];
@@ -1378,7 +1378,7 @@ function lzw_encode (s) {
}
// Decompress an LZW-encoded string
function lzw_decode (s) {
function lzw_decode(s) {
var dict = {};
var data = (s + "").split("");
var currChar = data[0];