i take it back shadowmario is not real sorry shadowmario

This commit is contained in:
Frakits
2024-02-02 17:07:29 +02:00
parent 0a8d2ff049
commit aa86c23597
5 changed files with 30 additions and 14 deletions
@@ -16,6 +16,8 @@ final class GameOverCreationEvent extends CancellableEvent
public var gameOverSong:String;
public var bpm:Int;
public var lossSFX:String;
public var retrySFX:String;
@@ -108,10 +108,10 @@ class CharacterInfoScreen extends UISubstateWindow {
customPropertiesButtonList.frames = Paths.getFrames('editors/ui/inputbox');
customPropertiesButtonList.cameraSpacing = 0;
customPropertiesButtonList.addButton.callback = function() {
customPropertiesButtonList.add(new PropertyButton("New Property", "Value Here"));
customPropertiesButtonList.add(new PropertyButton("New Property", "Value Here", customPropertiesButtonList));
}
for (prop=>val in character.extra)
customPropertiesButtonList.add(new PropertyButton(prop, val));
customPropertiesButtonList.add(new PropertyButton(prop, val, customPropertiesButtonList));
add(customPropertiesButtonList);
addLabelOn(customPropertiesButtonList, "Custom Values (Advanced)");
@@ -101,10 +101,10 @@ class MetaDataScreen extends UISubstateWindow {
customPropertiesButtonList.frames = Paths.getFrames('editors/ui/inputbox');
customPropertiesButtonList.cameraSpacing = 0;
customPropertiesButtonList.addButton.callback = function() {
customPropertiesButtonList.add(new PropertyButton("Property", "Value Here"));
customPropertiesButtonList.add(new PropertyButton("Property", "Value Here", customPropertiesButtonList));
}
for (val in Reflect.fields(metadata.customValues))
customPropertiesButtonList.add(new PropertyButton(val, Reflect.field(metadata.customValues, val)));
customPropertiesButtonList.add(new PropertyButton(val, Reflect.field(metadata.customValues, val), customPropertiesButtonList));
add(customPropertiesButtonList);
addLabelOn(customPropertiesButtonList, "Custom Values (Advanced)");
+17 -2
View File
@@ -3,16 +3,31 @@ package funkin.editors.extra;
class PropertyButton extends UIButton {
public var propertyText:UITextBox;
public var valueText:UITextBox;
public var deleteButton:UIButton;
public var deleteIcon:FlxSprite;
public function new(property, value) {
public function new(property, value, parent) {
super(0, 0, '', function () {}, 280, 35);
members.push(propertyText = new UITextBox(5, 5, property, 100, 25));
members.push(valueText = new UITextBox(propertyText.x + propertyText.bWidth + 10, 5, value, 165, 25));
members.push(valueText = new UITextBox(propertyText.x + propertyText.bWidth + 10, 5, value, 135, 25));
deleteButton = new UIButton(valueText.x + 135, bHeight/2 - (25/2), "", function () {
parent.remove(this);
}, 25, 25);
deleteButton.color = 0xFFFF0000;
deleteButton.autoAlpha = false;
members.push(deleteButton);
deleteIcon = new FlxSprite(deleteButton.x + (15/2), deleteButton.y + 8).loadGraphic(Paths.image('editors/delete-button'));
deleteIcon.antialiasing = false;
members.push(deleteIcon);
}
public override function update(elapsed) {
super.update(elapsed);
propertyText.follow(this, 5, 5);
valueText.follow(this, propertyText.x + propertyText.bWidth, 5);
deleteButton.follow(this, valueText.x + 135, bHeight/2 - (25/2));
deleteIcon.follow(deleteButton, 5, 5);
}
}
+7 -8
View File
@@ -19,6 +19,7 @@ class GameOverSubstate extends MusicBeatSubstate
public var characterName:String;
public var gameOverSong:String;
public var gameOverSongBPM:Int;
public var lossSFXName:String;
public var retrySFX:String;
public var player:Bool;
@@ -37,8 +38,7 @@ class GameOverSubstate extends MusicBeatSubstate
public var lossSFX:FlxSound;
public function new(x:Float, y:Float, character:String = "bf-dead", player:Bool = true, gameOverSong:String = "gameOver", lossSFX:String = "gameOverSFX",
retrySFX:String = "gameOverEnd")
public function new(x:Float, y:Float, character:String = "bf-dead", player:Bool = true, gameOverSong:String = "gameOver", lossSFX:String = "gameOverSFX", retrySFX:String = "gameOverEnd")
{
super();
this.x = x;
@@ -61,7 +61,7 @@ class GameOverSubstate extends MusicBeatSubstate
gameoverScript.setParent(this);
gameoverScript.load();
var event = EventManager.get(GameOverCreationEvent).recycle(x, y, characterName, player, gameOverSong, lossSFXName, retrySFX);
var event = EventManager.get(GameOverCreationEvent).recycle(x, y, characterName, player, gameOverSong, gameOverSongBPM, lossSFXName, retrySFX);
gameoverScript.call('create', [event]);
x = event.x;
@@ -69,6 +69,7 @@ class GameOverSubstate extends MusicBeatSubstate
characterName = event.character;
player = event.player;
gameOverSong = event.gameOverSong;
gameOverSongBPM = event.bpm;
lossSFXName = event.lossSFX;
retrySFX = event.retrySFX;
@@ -86,7 +87,7 @@ class GameOverSubstate extends MusicBeatSubstate
FlxG.camera.target = camFollow;
lossSFX = FlxG.sound.play(Paths.sound(lossSFXName));
Conductor.changeBPM(100);
Conductor.changeBPM(gameOverSongBPM);
DiscordUtil.changePresence('Game Over', PlayState.SONG.meta.displayName + " (" + PlayState.difficulty + ")");
@@ -119,9 +120,7 @@ class GameOverSubstate extends MusicBeatSubstate
FlxG.switchState(new FreeplayState());
}
if (!isEnding
&& ((!lossSFX.playing) || (character.getAnimName() == "firstDeath" && character.isAnimFinished()))
&& (FlxG.sound.music == null || !FlxG.sound.music.playing))
if (!isEnding && ((!lossSFX.playing) || (character.getAnimName() == "firstDeath" && character.isAnimFinished())) && (FlxG.sound.music == null || !FlxG.sound.music.playing))
{
CoolUtil.playMusic(Paths.music(gameOverSong), false, 1, true, 100);
beatHit(0);
@@ -189,4 +188,4 @@ class GameOverSubstate extends MusicBeatSubstate
super.destroy();
}
}
}