feat: 勇士及跟随者渲染

This commit is contained in:
AncTe committed 2025-11-22 23:48:59 +08:00
1 parent 37cd85cd1e
commit 8fe12634b0
43 files changed
+1472 -307

No files matched your search

+6 -2
View File
@@ -61,8 +61,12 @@ export abstract class Hookable<
this.hookMap.delete(obj.hook);
}
forEachHook(fn: (hook: Partial<H>, controller: C) => void): void {
this.loadedList.forEach(v => fn(v.hook, v.controller));
forEachHook<T>(fn: (hook: Partial<H>, controller: C) => T): T[] {
const arr: T[] = [];
this.loadedList.forEach(v => {
arr.push(fn(v.hook, v.controller));
});
return arr;
}
}
+9 -1
View File
@@ -41,7 +41,9 @@
"39": "Offset pool size exceeds WebGL2 limitation, ensure size type of your big image is less than $1.",
"40": "Material used by map block $1 is not found in built asset. Please ensure you have pack it into asset.",
"41": "You are trying to use a texture on moving block whose offset is not in the offset pool, please build it into asset after loading.",
"42": "The layerState property of map-render element is required.",
"42": "The '$1' property of map-render element is required.",
"43": "Cannot bind face direction to main block $1, please call malloc in advance.",
"44": "Cannot bind face direction to main block $1, since main direction cannot be override.",
"1101": "Shadow extension needs 'floor-hero' extension as dependency.",
"1201": "Floor-damage extension needs 'floor-binder' extension as dependency.",
"1301": "Portal extension need 'floor-binder' extension as dependency.",
@@ -135,6 +137,12 @@
"85": "Hook to load does not belong to current hookable object.",
"86": "Cannot restore vertex data since delivered state does not belong to current vertex generator instance.",
"87": "Map texture asset cache not hit. This has no effect on rendering, but may extremely affect performance, please see the following link to find solution.",
"88": "No hero image is specified, please set image in advance.",
"89": "Cannot set hero image, since there is no image named '$1'.",
"90": "Cannot set hero image, since delivered image has incorrect format or size.",
"91": "Cannot add follower, since specified follower number $1 does not exist.",
"92": "Followers can only be added when the last follower is not moving.",
"93": "Followers can only be removed when the last follower is not moving.",
"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."
}
+3 -2
View File
@@ -107,10 +107,11 @@ export interface IHookable<
removeHookByController(hook: C): void;
/**
* 遍历每个钩子
* 遍历每个钩子,执行顺序不固定
* @param fn 对每个钩子执行的函数
* @returns 每个钩子的返回值组成的数组,顺序不固定
*/
forEachHook(fn: (hook: Partial<H>, controller: C) => void): void;
forEachHook<T>(fn: (hook: Partial<H>, controller: C) => T): T[];
}
//#endregion