mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 12:48:11 +00:00
Revert "Add new bouncing trajectory for april fools (#3534)"
This reverts commit c92895620f.
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
BonusEventUpdate,
|
||||
ConquestUpdate,
|
||||
GameUpdateType,
|
||||
TextEventUpdate,
|
||||
} from "src/core/game/GameUpdates";
|
||||
import type { GameView, UnitView } from "../../../core/game/GameView";
|
||||
import { MoveWarshipIntentEvent } from "../../Transport";
|
||||
@@ -63,32 +62,12 @@ export class DynamicUILayer implements Layer {
|
||||
this.onBonusEvent(bonusEvent);
|
||||
});
|
||||
|
||||
updates[GameUpdateType.TextUIEvent]?.forEach((textEvent) => {
|
||||
if (textEvent === undefined) return;
|
||||
this.onTextEvent(textEvent);
|
||||
});
|
||||
|
||||
updates[GameUpdateType.ConquestEvent]?.forEach((update) => {
|
||||
if (update === undefined) return;
|
||||
this.onConquestEvent(update);
|
||||
});
|
||||
}
|
||||
|
||||
onTextEvent(textEvent: TextEventUpdate) {
|
||||
// Only display text fx for the current player
|
||||
if (this.game.player(textEvent.player) !== this.game.myPlayer()) {
|
||||
return;
|
||||
}
|
||||
const tile = textEvent.tile;
|
||||
const x = this.game.x(tile);
|
||||
const y = this.game.y(tile) + TEXT_OFFSET_Y;
|
||||
const text = textEvent.text;
|
||||
|
||||
this.uiElements.push(
|
||||
new TextIndicator(this.transformHandler, text, x, y, 500, 12),
|
||||
);
|
||||
}
|
||||
|
||||
onBonusEvent(bonus: BonusEventUpdate) {
|
||||
// Only display text fx for the current player
|
||||
if (this.game.player(bonus.player) !== this.game.myPlayer()) {
|
||||
|
||||
@@ -2,11 +2,7 @@ import { Theme } from "../../../core/configuration/Config";
|
||||
import { EventBus } from "../../../core/EventBus";
|
||||
import { UnitType } from "../../../core/game/Game";
|
||||
import { TileRef } from "../../../core/game/GameMap";
|
||||
import {
|
||||
ConquestUpdate,
|
||||
GameUpdateType,
|
||||
TextEventUpdate,
|
||||
} from "../../../core/game/GameUpdates";
|
||||
import { ConquestUpdate, GameUpdateType } from "../../../core/game/GameUpdates";
|
||||
import { GameView, UnitView } from "../../../core/game/GameView";
|
||||
import SoundManager, { SoundEffect } from "../../sound/SoundManager";
|
||||
import { AnimatedSpriteLoader } from "../AnimatedSpriteLoader";
|
||||
@@ -60,12 +56,6 @@ export class FxLayer implements Layer {
|
||||
if (update === undefined) return;
|
||||
this.onConquestEvent(update);
|
||||
});
|
||||
this.game
|
||||
.updatesSinceLastTick()
|
||||
?.[GameUpdateType.TextUIEvent]?.forEach((update) => {
|
||||
if (update === undefined) return;
|
||||
this.onBoingEvent(update);
|
||||
});
|
||||
}
|
||||
|
||||
onUnitEvent(unit: UnitView) {
|
||||
@@ -149,12 +139,6 @@ export class FxLayer implements Layer {
|
||||
}
|
||||
}
|
||||
|
||||
onBoingEvent(boing: TextEventUpdate) {
|
||||
const x = this.game.x(boing.tile);
|
||||
const y = this.game.y(boing.tile);
|
||||
this.allFx.push(new ShockwaveFx(x, y, 1000, 20));
|
||||
}
|
||||
|
||||
onConquestEvent(conquest: ConquestUpdate) {
|
||||
// Only display fx for the current player
|
||||
const conqueror = this.game.player(conquest.conquerorId);
|
||||
|
||||
Reference in New Issue
Block a user