This commit is contained in:
Yoshman29
2022-10-18 13:45:21 +02:00
parent 4ba8ce198a
commit f31815ab10
3 changed files with 12 additions and 24 deletions
+1 -1
View File
@@ -1 +1 @@
526
527
+5 -19
View File
@@ -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<String> = [null, 'ready', "set", "go"];
var introSounds:Array<String> = ['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);
@@ -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();