feat: Add August Variant Update event banner

This commit is contained in:
Frederico Santos 2024-08-17 05:33:31 +01:00
parent f6e99f1f6c
commit 06c110e257
3 changed files with 28 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

View File

@ -42,6 +42,7 @@ export class LoadingScene extends SceneBase {
this.loadImage("loading_bg", "arenas"); this.loadImage("loading_bg", "arenas");
this.loadImage("logo", ""); this.loadImage("logo", "");
// this.loadImage("pride-update", "events"); // this.loadImage("pride-update", "events");
this.loadImage("august-variant-update", "events");
// Load menu images // Load menu images
this.loadAtlas("bg", "ui"); this.loadAtlas("bg", "ui");

View File

@ -23,6 +23,14 @@ const timedEvents: TimedEvent[] = [
endDate: new Date(Date.UTC(2024, 5, 23, 0)), endDate: new Date(Date.UTC(2024, 5, 23, 0)),
bannerFilename: "pride-update" bannerFilename: "pride-update"
}, },
{
name: "August Variant Update",
eventType: EventType.SHINY,
shinyMultiplier: 2,
startDate: new Date(Date.UTC(2024, 7, 16, 0)),
endDate: new Date(Date.UTC(2024, 7, 21, 0)),
bannerFilename: "august-variant-update"
}
]; ];
export class TimedEventManager { export class TimedEventManager {
@ -77,22 +85,23 @@ export class TimedEventDisplay extends Phaser.GameObjects.Container {
} }
setup() { setup() {
console.log(this.event?.bannerFilename);
this.banner = new Phaser.GameObjects.Image(this.scene, 29, 64, this.event!.bannerFilename!); // TODO: are the bangs correct here? this.banner = new Phaser.GameObjects.Image(this.scene, 29, 64, this.event!.bannerFilename!); // TODO: are the bangs correct here?
this.banner.setName("img-event-banner"); this.banner.setName("img-event-banner");
this.banner.setOrigin(0, 0); this.banner.setOrigin(0.08, -0.35);
this.banner.setScale(0.07); this.banner.setScale(0.18);
this.bannerShadow = new Phaser.GameObjects.Rectangle( // this.bannerShadow = new Phaser.GameObjects.Rectangle(
this.scene, // this.scene,
this.banner.x - 2, // this.banner.x - 2,
this.banner.y + 2, // this.banner.y + 2,
this.banner.width, // this.banner.width,
this.banner.height, // this.banner.height,
0x484848 // 0x484848
); // );
this.bannerShadow.setName("rect-event-banner-shadow"); // this.bannerShadow.setName("rect-event-banner-shadow");
this.bannerShadow.setScale(0.07); // this.bannerShadow.setScale(0.07);
this.bannerShadow.setAlpha(0.5); // this.bannerShadow.setAlpha(0.5);
this.bannerShadow.setOrigin(0,0); // this.bannerShadow.setOrigin(0,0);
this.eventTimerText = addTextObject( this.eventTimerText = addTextObject(
this.scene, this.scene,
this.banner.x + 8, this.banner.x + 8,
@ -104,7 +113,10 @@ export class TimedEventDisplay extends Phaser.GameObjects.Container {
this.eventTimerText.setScale(0.15); this.eventTimerText.setScale(0.15);
this.eventTimerText.setOrigin(0,0); this.eventTimerText.setOrigin(0,0);
this.add([this.eventTimerText, this.bannerShadow, this.banner]); this.add([
this.eventTimerText,
// this.bannerShadow,
this.banner]);
} }
show() { show() {