mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 12:49:25 +08:00
refactor: 着色器 & fix: 移动报错
This commit is contained in:
parent
7bcd9ebeb2
commit
0989c82a6b
File diff suppressed because it is too large
Load Diff
@ -48,6 +48,14 @@
|
|||||||
"22": "There is already an active camera for delivered render item. Consider using 'Camera.for' or diable the active camera to avoid some exceptions.",
|
"22": "There is already an active camera for delivered render item. Consider using 'Camera.for' or diable the active camera to avoid some exceptions.",
|
||||||
"23": "Render item with id of '$1' has already exists.",
|
"23": "Render item with id of '$1' has already exists.",
|
||||||
"24": "Uniform block can only be used in glsl version es 300.",
|
"24": "Uniform block can only be used in glsl version es 300.",
|
||||||
|
"25": "Cannot activate weather since there's no weather with id of '$1'.",
|
||||||
|
"26": "Cannot set attribute when only element number specified. Use 'pointer' or 'pointerI' instead.",
|
||||||
|
"27": "Cannot vertex attribute integer point when specified as float. Use 'set' or 'pointer' instead.",
|
||||||
|
"28": "Redefinition of shader $1: '$2'",
|
||||||
|
"29": "Cannot define new texture since texture index is larger than max texture count.",
|
||||||
|
"30": "Cannot use indices named $1 since no definition for it. Please define it in advance.",
|
||||||
|
"31": "Cannot use indices since the indices instance is not belongs to the program.",
|
||||||
|
"32": "Sub-image exceeds texture dimensions, auto adjusting size.",
|
||||||
"1001": "Item-detail extension needs 'floor-binder' and 'floor-damage' extension as dependency.",
|
"1001": "Item-detail extension needs 'floor-binder' and 'floor-damage' extension as dependency.",
|
||||||
"1101": "Cannot add new effect to point effect instance, for there's no more reserve space for it. Please increase the max count of the instance."
|
"1101": "Cannot add new effect to point effect instance, for there's no more reserve space for it. Please increase the max count of the instance."
|
||||||
}
|
}
|
||||||
|
@ -487,12 +487,16 @@ export class HeroMover extends ObjectMoverBase {
|
|||||||
if (!adapter || !viewport) return;
|
if (!adapter || !viewport) return;
|
||||||
await adapter.all('readyMove');
|
await adapter.all('readyMove');
|
||||||
// 这里要检查前面那一格能不能走,不能走则不触发平滑视角,以避免撞墙上视角卡住
|
// 这里要检查前面那一格能不能走,不能走则不触发平滑视角,以避免撞墙上视角卡住
|
||||||
const { x, y } = core.status.hero.loc;
|
if (!this.ignoreTerrain) {
|
||||||
const firstDir = controller.queue.find(v => v.type === 'dir')?.value;
|
const { x, y } = core.status.hero.loc;
|
||||||
if (firstDir) {
|
const firstDir = controller.queue.find(
|
||||||
const data = this.checkCanMove(x, y, toDir(firstDir as Dir));
|
v => v.type === 'dir'
|
||||||
if (data.canMove && !data.noPass) {
|
)?.value;
|
||||||
viewport.sync('startMove');
|
if (firstDir && firstDir !== 'backward' && firstDir !== 'forward') {
|
||||||
|
const data = this.checkCanMove(x, y, toDir(firstDir as Dir));
|
||||||
|
if (data.canMove && !data.noPass) {
|
||||||
|
viewport.sync('startMove');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
adapter.sync('startAnimate');
|
adapter.sync('startAnimate');
|
||||||
|
@ -307,7 +307,7 @@ export function init() {
|
|||||||
core.status.replay.animate = false;
|
core.status.replay.animate = false;
|
||||||
Mota.require('var', 'hook').emit(
|
Mota.require('var', 'hook').emit(
|
||||||
'afterOpenDoor',
|
'afterOpenDoor',
|
||||||
block.event.id,
|
block.event.id as AllIdsOf<'animates'>,
|
||||||
x,
|
x,
|
||||||
y
|
y
|
||||||
);
|
);
|
||||||
@ -323,7 +323,12 @@ export function init() {
|
|||||||
core.maps._removeBlockFromMap(core.status.floorId, block);
|
core.maps._removeBlockFromMap(core.status.floorId, block);
|
||||||
if (!locked) core.unlockControl();
|
if (!locked) core.unlockControl();
|
||||||
core.status.replay.animate = false;
|
core.status.replay.animate = false;
|
||||||
hook.emit('afterOpenDoor', block.event.id, x, y);
|
hook.emit(
|
||||||
|
'afterOpenDoor',
|
||||||
|
block.event.id as AllIdsOf<'animates'>,
|
||||||
|
x,
|
||||||
|
y
|
||||||
|
);
|
||||||
callback?.();
|
callback?.();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
2
src/types/enemy.d.ts
vendored
2
src/types/enemy.d.ts
vendored
@ -164,7 +164,7 @@ interface EnemySpecialBase {
|
|||||||
special: number[];
|
special: number[];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BookEnemyInfo extends Enemy, EnemyInfo {
|
interface BookEnemyInfo extends Enemy {
|
||||||
/**
|
/**
|
||||||
* 怪物的坐标列表
|
* 怪物的坐标列表
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user