mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-26 11:34:30 +08:00
道具栏
This commit is contained in:
1 parent
c29a958689
commit
9b2c56f829
25 files changed
+3088
-3265
No files matched your search
Vendored
+1
-1
@@ -330,7 +330,7 @@ declare class Sprite {
|
||||
removeEventListenr: HTMLCanvasElement['addEventListener'];
|
||||
}
|
||||
|
||||
declare const main: main;
|
||||
declare const main: Main;
|
||||
declare const core: Core;
|
||||
declare const flags: { [x: string]: any };
|
||||
declare const hero: HeroStatus;
|
||||
|
||||
Vendored
+4
-1
@@ -479,7 +479,10 @@ declare class maps {
|
||||
resizeMap(floorId?: string): void;
|
||||
|
||||
/** 以x,y的形式返回每个点的事件 */
|
||||
getMapBlocksObj(floorId?: string, noCache?: boolean): object;
|
||||
getMapBlocksObj(
|
||||
floorId?: string,
|
||||
noCache?: boolean
|
||||
): Record<`${number},${number}`, Block>;
|
||||
|
||||
/** 获得某些点可否通行的信息 */
|
||||
canMoveDirectlyArray(locs?: any): object;
|
||||
|
||||
Vendored
+20
@@ -6,6 +6,14 @@ type Ref<T> = {
|
||||
|
||||
type DragFn = (x: number, y: number, e: MouseEvent | TouchEvent) => void;
|
||||
|
||||
type CanParseCss = keyof {
|
||||
[P in keyof CSSStyleDeclaration as CSSStyleDeclaration[P] extends string
|
||||
? P extends string
|
||||
? P
|
||||
: never
|
||||
: never]: CSSStyleDeclaration[P];
|
||||
};
|
||||
|
||||
interface PluginDeclaration extends PluginUtils {
|
||||
/**
|
||||
* 添加函数 例:添加弹出文字,像这个就可以使用core.addPop或core.plugin.addPop调用
|
||||
@@ -24,9 +32,15 @@ interface PluginDeclaration extends PluginUtils {
|
||||
/** 怪物手册详细信息展示的怪物 */
|
||||
bookDetailEnemy: Enemy & DetailedEnemy;
|
||||
|
||||
/** ui是否使用渐变 */
|
||||
readonly transition: Ref<boolean>;
|
||||
|
||||
/** 手册是否打开 */
|
||||
readonly bookOpened: Ref<boolean>;
|
||||
|
||||
/** 道具栏是否打开 */
|
||||
readonly toolOpened: Ref<boolean>;
|
||||
|
||||
/** ui栈 */
|
||||
readonly uiStack: Ref<Component[]>;
|
||||
|
||||
@@ -96,6 +110,12 @@ interface PluginUtils {
|
||||
* @param damage 伤害大小
|
||||
*/
|
||||
getDamageColor(damage: number): string;
|
||||
|
||||
/**
|
||||
* 解析css字符串为CSSStyleDeclaration对象
|
||||
* @param css 要解析的css字符串
|
||||
*/
|
||||
parseCss(css: string): Partial<Record<CanParseCss, string>>;
|
||||
}
|
||||
|
||||
type Forward<T> = {
|
||||
|
||||
Vendored
+6
-1
@@ -553,7 +553,12 @@ type DetailedEnemy = {
|
||||
};
|
||||
|
||||
type Item = {
|
||||
cls: string;
|
||||
name: string;
|
||||
cls: 'items' | 'constants' | 'tools' | 'equips';
|
||||
text: string;
|
||||
hideInToolbox?: boolean;
|
||||
color?: string;
|
||||
css?: string;
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user