mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-05 03:14:31 +08:00
更新热重载服务
This commit is contained in:
1 parent
a61952034a
commit
9b5b212828
14 files changed
+685
-742
No files matched your search
@@ -117,7 +117,8 @@ maps.prototype._loadFloor_doNotCopy = function () {
|
||||
'afterBattle',
|
||||
'afterGetItem',
|
||||
'afterOpenDoor',
|
||||
'cannotMove'
|
||||
'cannotMove',
|
||||
'enemy'
|
||||
];
|
||||
};
|
||||
////// 绘制背景和前景层 //////
|
||||
|
||||
@@ -159,7 +159,7 @@ export {};
|
||||
console.log(`Data hot reload: ${data}`);
|
||||
}
|
||||
|
||||
const ws = new WebSocket('ws://127.0.0.1:8080');
|
||||
const ws = new WebSocket('ws://127.0.0.1:3000');
|
||||
ws.addEventListener('open', () => {
|
||||
console.log(`Web socket connect successfully`);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export {};
|
||||
import { ensureFloorDamage } from './damage';
|
||||
|
||||
core.control.updateDamage = function (floorId = core.status.floorId, ctx) {
|
||||
if (!floorId || core.status.gameOver || main.mode !== 'play') return;
|
||||
@@ -16,7 +16,7 @@ core.control.updateDamage = function (floorId = core.status.floorId, ctx) {
|
||||
if (width * height > core.bigmap.threshold) return;
|
||||
}
|
||||
// 计算伤害
|
||||
core.plugin.damage.ensureFloorDamage(floorId);
|
||||
ensureFloorDamage(floorId);
|
||||
|
||||
floor.enemy.calDamage(true, onMap);
|
||||
floor.enemy.calMapDamage();
|
||||
|
||||
@@ -8,7 +8,7 @@ control.prototype.checkBlock = function (forceMockery) {
|
||||
var x = core.getHeroLoc('x'),
|
||||
y = core.getHeroLoc('y'),
|
||||
loc = x + ',' + y;
|
||||
var damage = core.status.checkBlock.damage[loc];
|
||||
var damage = 0;
|
||||
if (damage) {
|
||||
if (!main.replayChecking)
|
||||
core.addPop(
|
||||
@@ -33,8 +33,8 @@ control.prototype.checkBlock = function (forceMockery) {
|
||||
core.updateStatusBar();
|
||||
}
|
||||
}
|
||||
this._checkBlock_repulse(core.status.checkBlock.repulse[loc]);
|
||||
checkMockery(loc, forceMockery);
|
||||
// this._checkBlock_repulse(core.status.checkBlock.repulse[loc]);
|
||||
// checkMockery(loc, forceMockery);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -147,9 +147,9 @@ control.prototype.moveHero = function (direction, callback) {
|
||||
|
||||
const nx = core.nextX();
|
||||
const ny = core.nextY();
|
||||
if (core.status.checkBlock.mockery[`${nx},${ny}`]) {
|
||||
core.autosave();
|
||||
}
|
||||
// if (core.status.checkBlock.mockery[`${nx},${ny}`]) {
|
||||
// core.autosave();
|
||||
// }
|
||||
|
||||
if (callback) return this.moveAction(callback);
|
||||
this._moveHero_moving();
|
||||
|
||||
@@ -154,6 +154,7 @@ export function boundary(arr: any, key?: any) {
|
||||
return [min, max];
|
||||
}
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface GamePluginUtils {
|
||||
ofDir: typeof ofDir;
|
||||
|
||||
Reference in new issue
Block a user