From f31815ab100e540138c175c2e7a9976eecc70645 Mon Sep 17 00:00:00 2001 From: Yoshman29 Date: Tue, 18 Oct 2022 13:45:21 +0200 Subject: [PATCH] e --- buildnumber.txt | 2 +- source/funkin/game/PlayState.hx | 24 ++++--------------- .../funkin/scripting/events/CountdownEvent.hx | 10 ++++---- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/buildnumber.txt b/buildnumber.txt index 3c2af958..19afd4eb 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -526 \ No newline at end of file +527 \ No newline at end of file diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 8efc6541..2b60bdd1 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -338,9 +338,6 @@ class PlayState extends MusicBeatState var swagCounter:Int = 0; - introAssets.set('school', ['weeb/pixelUI/ready-pixel', 'weeb/pixelUI/set-pixel', 'weeb/pixelUI/date-pixel']); - introAssets.set('schoolEvil', ['weeb/pixelUI/ready-pixel', 'weeb/pixelUI/set-pixel', 'weeb/pixelUI/date-pixel']); - var introSprites:Array = [null, 'ready', "set", "go"]; var introSounds:Array = ['intro3', 'intro2', "intro1", "introGo"]; @@ -348,27 +345,16 @@ class PlayState extends MusicBeatState { dad.dance(); gf.dance(); - boyfriend.playAnim('idle'); - - var altSuffix:String = ""; - - for (value in introAssets.keys()) - { - if (value == curStage) - { - introAlts = introAssets.get(value); - altSuffix = '-pixel'; - } - } + boyfriend.dance(); var event:CountdownEvent = scripts.event("onCountdown", new CountdownEvent( introSprites[swagCounter], introSounds[swagCounter], 1, 0.6, true)); - var sprite:FlxSprite; - var sound:FlxSound; - var tween:FlxTween; + var sprite:FlxSprite = null; + var sound:FlxSound = null; + var tween:FlxTween = null; if (!event.cancelled) { if (event.spritePath != null) { @@ -398,7 +384,7 @@ class PlayState extends MusicBeatState event.sound = sound; event.spriteTween = tween; event.cancelled = false; - + scripts.event("onCountdownPost", event); swagCounter += 1; }, introLength); diff --git a/source/funkin/scripting/events/CountdownEvent.hx b/source/funkin/scripting/events/CountdownEvent.hx index 05c6ba28..05a68473 100644 --- a/source/funkin/scripting/events/CountdownEvent.hx +++ b/source/funkin/scripting/events/CountdownEvent.hx @@ -1,6 +1,8 @@ package funkin.scripting.events; import flixel.tweens.FlxTween; +import flixel.FlxSprite; +import flixel.system.FlxSound; class CountdownEvent extends CancellableEvent { /** @@ -33,14 +35,14 @@ class CountdownEvent extends CancellableEvent { * Created sprite, only available in `onCountdownPost` */ public var sprite:FlxSprite; + /** + * Created tween for the sprite, only available in `onCountdownPost` + */ + public var spriteTween:FlxTween; /** * Created sound, only available in `onCountdownPost` */ public var sound:FlxSound; - /** - * Created tween, only available in `onCountdownPost` - */ - public var tween:FlxTween; public function new(spritePath:String, soundPath:String, scale:Float = 1, volume:Float = 1, antialiasing:Bool = true) { super();