mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-14 18:54:30 +08:00
feat: 优化各种性能表现
This commit is contained in:
1 parent
740dfdb6ce
commit
7e5b20d3ad
10 files changed
+75
-480
No files matched your search
@@ -85,7 +85,7 @@ export class SoundEffect extends AudioPlayer {
|
||||
* @returns 音频的唯一id
|
||||
*/
|
||||
playSE() {
|
||||
if (SoundEffect.disable) return;
|
||||
if (SoundEffect.disable || this.volumn === 0) return;
|
||||
const node = this.play();
|
||||
if (!node) return;
|
||||
const index = SoundEffect.playIndex++;
|
||||
|
||||
@@ -159,6 +159,7 @@ export class Portal extends Sprite {
|
||||
}
|
||||
|
||||
private renderPortal(canvas: MotaOffscreenCanvas2D) {
|
||||
if (this.renderable.size === 0) return;
|
||||
const { ctx } = canvas;
|
||||
|
||||
const p = this.particleSetting.value;
|
||||
|
||||
Vendored
-13
@@ -1075,19 +1075,6 @@ interface Core extends Pick<Main, CoreDataFromMain> {
|
||||
*/
|
||||
init(coreData: MainData, callback?: () => void): Promise<void>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* 在一个上下文下执行函数(真的有人会用这个东西吗?
|
||||
* @param func 要执行的函数
|
||||
* @param _this 执行函数的上下文
|
||||
* @param params 函数的参数
|
||||
*/
|
||||
doFunc<F extends (...args: any) => any>(
|
||||
func: F,
|
||||
_this: any,
|
||||
...params: Parameters<F>
|
||||
): ReturnType<F>;
|
||||
|
||||
_afterLoadResources(callback?: () => void): void;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user