mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 11:42:03 +00:00
cea22c8220
## Description: https://github.com/user-attachments/assets/b46f949a-eb50-4656-8492-216cf820ac46 Add a couple animations for naval combat: - shell hit - ship explosion - ship sinking Added a simple `Timeline` class to spread FX animations over time. Added a `ColoredAnimatedSprite` similar to the existing `ColoredSprite`. Refactored the latter to avoid code duplication. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: IngloriousTom
16 lines
397 B
TypeScript
16 lines
397 B
TypeScript
export interface Fx {
|
|
renderTick(duration: number, ctx: CanvasRenderingContext2D): boolean;
|
|
}
|
|
|
|
export enum FxType {
|
|
MiniFire = "MiniFire",
|
|
MiniSmoke = "MiniSmoke",
|
|
MiniBigSmoke = "MiniBigSmoke",
|
|
MiniSmokeAndFire = "MiniSmokeAndFire",
|
|
MiniExplosion = "MiniExplosion",
|
|
UnitExplosion = "UnitExplosion",
|
|
SinkingShip = "SinkingShip",
|
|
Nuke = "Nuke",
|
|
SAMExplosion = "SAMExplosion",
|
|
}
|