mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-10-08 03:11:46 +08:00
Compare commits
2 Commits
6891062351
...
cb07cf14a8
Author | SHA1 | Date | |
---|---|---|---|
cb07cf14a8 | |||
4d7ec615bb |
@ -76,11 +76,6 @@ gameKey
|
||||
name: '快捷商店',
|
||||
defaults: KeyCode.KeyV
|
||||
})
|
||||
.register({
|
||||
id: 'statistics',
|
||||
name: '数据统计',
|
||||
defaults: KeyCode.KeyB
|
||||
})
|
||||
.register({
|
||||
id: 'viewMap_1',
|
||||
name: '浏览地图_1',
|
||||
|
@ -3,7 +3,6 @@ import { MAIN_WIDTH, MAIN_HEIGHT, POP_BOX_WIDTH, CENTER_LOC } from './shared';
|
||||
import {
|
||||
saveSave,
|
||||
mainUIController,
|
||||
openStatistics,
|
||||
saveLoad,
|
||||
openSettings,
|
||||
ReplaySettingsUI,
|
||||
@ -16,9 +15,6 @@ export function createAction() {
|
||||
.realize('save', () => {
|
||||
saveSave(mainUIController, [0, 0, MAIN_WIDTH, MAIN_HEIGHT]);
|
||||
})
|
||||
.realize('statistics', () => {
|
||||
openStatistics(mainUIController);
|
||||
})
|
||||
.realize('load', () => {
|
||||
saveLoad(mainUIController, [0, 0, MAIN_WIDTH, MAIN_HEIGHT]);
|
||||
})
|
||||
|
@ -8,9 +8,7 @@ import {
|
||||
import { logger } from '@motajs/common';
|
||||
import EventEmitter from 'eventemitter3';
|
||||
import { isNil } from 'lodash-es';
|
||||
import { tagMap } from '@motajs/render';
|
||||
import { IDamageEnemy, IEnemyCollection, MapDamage } from '@motajs/types';
|
||||
import { UserEnemyInfo } from '@user/data-state';
|
||||
import { BlockCacher, ICanvasCacheItem, CanvasCacheItem } from './block';
|
||||
import {
|
||||
ILayerGroupRenderExtends,
|
||||
@ -326,7 +324,6 @@ export class Damage extends RenderItem<EDamageEvent> {
|
||||
const y = enemy.y!;
|
||||
const { damage } = enemy.calDamage();
|
||||
const cri = enemy.calCritical(1)[0]?.atkDelta ?? Infinity;
|
||||
const real = enemy.getRealInfo() as UserEnemyInfo;
|
||||
|
||||
const dam1: DamageRenderable = {
|
||||
align: 'left',
|
||||
@ -345,45 +342,6 @@ export class Damage extends RenderItem<EDamageEvent> {
|
||||
y: y * this.cellSize + this.cellSize - 11
|
||||
};
|
||||
block.add(dam1).add(dam2);
|
||||
|
||||
const hasHorn = real.special.has(33);
|
||||
if (real.special.has(8) && real.togetherNum && !hasHorn) {
|
||||
const dam3: DamageRenderable = {
|
||||
align: 'right',
|
||||
baseline: 'top',
|
||||
text: real.togetherNum.toString(),
|
||||
color: '#09FF5B',
|
||||
x: x * this.cellSize + this.cellSize - 1,
|
||||
y: y * this.cellSize + 2,
|
||||
strokeWidth: 3
|
||||
};
|
||||
block.add(dam3);
|
||||
}
|
||||
if (real.special.has(30)) {
|
||||
const dam4: DamageRenderable = {
|
||||
align: 'left',
|
||||
baseline: 'top',
|
||||
text: '乾',
|
||||
color: '#FDCD0B',
|
||||
x: x * this.cellSize + 1,
|
||||
y: y * this.cellSize + 2,
|
||||
strokeWidth: 2,
|
||||
font: '500 10px Verdana'
|
||||
};
|
||||
block.add(dam4);
|
||||
}
|
||||
if (enemy.col && hasHorn) {
|
||||
const dam5: DamageRenderable = {
|
||||
align: 'right',
|
||||
baseline: 'top',
|
||||
text: enemy.col.list.size.toString(),
|
||||
color: '#fff866',
|
||||
x: x * this.cellSize + this.cellSize - 1,
|
||||
y: y * this.cellSize + 2,
|
||||
strokeWidth: 3
|
||||
};
|
||||
block.add(dam5);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -427,25 +385,10 @@ export class Damage extends RenderItem<EDamageEvent> {
|
||||
) {
|
||||
// todo: 这个应当可以自定义,通过地图伤害注册实现
|
||||
let text = '';
|
||||
let color = '#fa3';
|
||||
let font = '300 9px Verdana';
|
||||
const color = '#fa3';
|
||||
const font = '300 9px Verdana';
|
||||
if (dam.damage > 0) {
|
||||
text = core.formatBigNumber(dam.damage, true);
|
||||
} else if (dam.mockery) {
|
||||
dam.mockery.sort((a, b) =>
|
||||
a[0] === b[0] ? a[1] - b[1] : a[0] - b[0]
|
||||
);
|
||||
const [tx, ty] = dam.mockery[0];
|
||||
const dir = x > tx ? '←' : x < tx ? '→' : y > ty ? '↑' : '↓';
|
||||
text = '嘲' + dir;
|
||||
color = '#fd4';
|
||||
font = '500 11px Verdana';
|
||||
} else if (dam.hunt) {
|
||||
text = '猎';
|
||||
color = '#fd4';
|
||||
font = '500 11px Verdana';
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
const mapDam: DamageRenderable = {
|
||||
@ -593,9 +536,4 @@ export class Damage extends RenderItem<EDamageEvent> {
|
||||
}
|
||||
}
|
||||
|
||||
// 注册为内部元素
|
||||
tagMap.register<EDamageEvent, Damage>('damage', (_0, _1, _props) => {
|
||||
return new Damage();
|
||||
});
|
||||
|
||||
// const adapter = new RenderAdapter<Damage>('damage');
|
||||
|
@ -8,7 +8,6 @@ export * from './controller';
|
||||
export * from './main';
|
||||
export * from './save';
|
||||
export * from './settings';
|
||||
export * from './statistics';
|
||||
export * from './statusBar';
|
||||
export * from './toolbar';
|
||||
export * from './viewmap';
|
||||
|
@ -20,7 +20,6 @@ import { generateKeyboardEvent } from '@motajs/system-action';
|
||||
import { getVitualKeyOnce } from '@motajs/legacy-ui';
|
||||
import { getAllSavesData, getSaveData, syncFromServer } from '../utils';
|
||||
import { getInput } from '../components';
|
||||
import { openStatistics } from './statistics';
|
||||
import { saveWithExist } from './save';
|
||||
import { compressToBase64 } from 'lz-string';
|
||||
import { ViewMapUI } from './viewmap';
|
||||
@ -276,7 +275,12 @@ export const GameInfo = defineComponent<MainSettingsProps>(props => {
|
||||
const choose = async (key: ChoiceKey) => {
|
||||
switch (key) {
|
||||
case GameInfoChoice.Statistics: {
|
||||
openStatistics(props.controller);
|
||||
getConfirm(
|
||||
props.controller,
|
||||
'数据统计尚未完工',
|
||||
CENTER_LOC,
|
||||
POP_BOX_WIDTH
|
||||
);
|
||||
break;
|
||||
}
|
||||
case GameInfoChoice.Project: {
|
||||
|
@ -9,6 +9,8 @@ import { waitbox, ListPage, TextContent } from '../components';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
import { ItemState } from '@user/data-state';
|
||||
|
||||
// 未完工
|
||||
|
||||
export interface StatisticsDataOneFloor {
|
||||
enemyCount: number;
|
||||
potionCount: number;
|
||||
|
@ -7,8 +7,7 @@ import * as glob from 'glob';
|
||||
|
||||
const custom = [
|
||||
'container', 'image', 'sprite', 'shader', 'text', 'comment', 'custom',
|
||||
'layer', 'layer-group', 'animate', 'damage', 'graphics', 'icon', 'winskin',
|
||||
'container-custom'
|
||||
'layer', 'layer-group', 'animate', 'icon', 'winskin', 'container-custom'
|
||||
];
|
||||
|
||||
const aliases = glob.sync('packages/*/src').map((srcPath) => {
|
||||
|
Loading…
Reference in New Issue
Block a user