Revert "Halloween Event (#2285)"

This reverts commit b69adf70b3.
This commit is contained in:
evanpelle
2025-11-04 09:26:48 -08:00
parent ca28db735f
commit 4144628808
28 changed files with 63 additions and 212 deletions
+1
View File
@@ -26,6 +26,7 @@ export function conquestFxFactory(
x,
y,
FxType.Conquest,
2500,
);
const fadeAnimation = new FadeFx(swordAnimation, 0.1, 0.6);
conquestFx.push(fadeAnimation);
-4
View File
@@ -16,8 +16,4 @@ export enum FxType {
UnderConstruction = "UnderConstruction",
Dust = "Dust",
Conquest = "Conquest",
Tentacle = "Tentacle",
Shark = "Shark",
Bubble = "Bubble",
Tornado = "Tornado",
}
+2 -31
View File
@@ -19,35 +19,6 @@ function fadeInOut(
return 1 - f * f;
}
}
/**
* Move a sprite around
*/
export class MoveSpriteFx implements Fx {
private originX: number;
private originY: number;
constructor(
private fxToMove: SpriteFx,
private toX: number,
private toY: number,
private fadeIn: number = 0.1,
private fadeOut: number = 0.9,
) {
this.originX = fxToMove.x;
this.originY = fxToMove.y;
}
renderTick(duration: number, ctx: CanvasRenderingContext2D): boolean {
const t = this.fxToMove.getElapsedTime() / this.fxToMove.getDuration();
this.fxToMove.x = Math.floor(this.originX * (1 - t) + this.toX * t);
this.fxToMove.y = Math.floor(this.originY * (1 - t) + this.toY * t);
ctx.save();
ctx.globalAlpha = fadeInOut(t, this.fadeIn, this.fadeOut);
const result = this.fxToMove.renderTick(duration, ctx);
ctx.restore();
return result;
}
}
/**
* Fade in/out another FX
*/
@@ -78,8 +49,8 @@ export class SpriteFx implements Fx {
protected waitToTheEnd = false;
constructor(
animatedSpriteLoader: AnimatedSpriteLoader,
public x: number,
public y: number,
protected x: number,
protected y: number,
fxType: FxType,
duration?: number,
owner?: PlayerView,