mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-04 19:04:32 +08:00
feat: 地图渲染大致完成
This commit is contained in:
1 parent
2316bc4cad
commit
117bd94928
30 files changed
+1921
-148
No files matched your search
@@ -57,11 +57,13 @@ export function init() {
|
||||
const hso = hyper('sin', 'out');
|
||||
let time2 = Date.now();
|
||||
Mota.rewrite(core.control, '_moveAction_moving', 'front', () => {
|
||||
const t = setting.getValue('screen.smoothView', false) ? 200 : 0;
|
||||
const f = core.status.floorId === 'tower6';
|
||||
const t = setting.getValue('screen.smoothView', false) && !f ? 200 : 0;
|
||||
if (Date.now() - time2 > 20) tran.mode(hso).time(t).absolute();
|
||||
});
|
||||
Mota.rewrite(core.control, 'moveDirectly', 'front', () => {
|
||||
const t = setting.getValue('screen.smoothView', false) ? 600 : 0;
|
||||
const f = core.status.floorId === 'tower6';
|
||||
const t = setting.getValue('screen.smoothView', false) && !f ? 600 : 0;
|
||||
time2 = Date.now();
|
||||
tran.mode(hso).time(t).absolute();
|
||||
});
|
||||
|
||||
@@ -14,6 +14,7 @@ export function drawHalo(
|
||||
if (main.replayChecking) return;
|
||||
const setting = Mota.require('var', 'mainSetting');
|
||||
if (!setting.getValue('screen.halo', true)) return;
|
||||
Mota.require('fn', 'ensureFloorDamage')(floorId);
|
||||
const col = core.status.maps[floorId].enemy;
|
||||
const [dx, dy] = col.translation;
|
||||
const list = col.haloList.concat(
|
||||
|
||||
@@ -103,7 +103,7 @@ function drawItemDetail(diff: any, x: number, y: number) {
|
||||
let color = '#fff';
|
||||
|
||||
if (typeof diff[name] === 'number')
|
||||
content = core.formatBigNumber(diff[name], true);
|
||||
content = core.formatBigNumber(Math.round(diff[name]), true);
|
||||
else content = diff[name];
|
||||
|
||||
switch (name) {
|
||||
|
||||
@@ -192,7 +192,7 @@ export function init() {
|
||||
maps.prototype._getBgFgMapArray = function (
|
||||
name: string,
|
||||
floorId: FloorIds,
|
||||
noCache: boolean
|
||||
noCache: boolean = false
|
||||
) {
|
||||
floorId = floorId || core.status.floorId;
|
||||
if (!floorId) return [];
|
||||
|
||||
Reference in new issue
Block a user