fixed more things that pissed me off
This commit is contained in:
@@ -6,11 +6,12 @@ public var thunderSFXamount:Int = 2;
|
||||
function create() {
|
||||
for(i in 1...thunderSFXamount+1)
|
||||
FlxG.sound.load(Paths.sound('thunder_' + Std.string(i)));
|
||||
bg.playAnim('idle');
|
||||
}
|
||||
public function lightningStrikeShit():Void
|
||||
{
|
||||
FlxG.sound.play(Paths.soundRandom('thunder_', 1, thunderSFXamount));
|
||||
bg.animation.play('lightning');
|
||||
bg.playAnim('lightning');
|
||||
|
||||
lightningStrikeBeat = curBeat;
|
||||
lightningOffset = FlxG.random.int(8, 24);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.9 MiB |
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextureAtlas imagePath="halloween_bg.png">
|
||||
<!-- Created with Adobe Animate version 20.0.0.17400 -->
|
||||
<!-- http://www.adobe.com/products/animate.html -->
|
||||
<SubTexture name="halloweem bg0000" x="0" y="0" width="2114" height="1075"/>
|
||||
<SubTexture name="halloweem bg lightning strike0000" x="2124" y="0" width="2114" height="1075" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0001" x="4248" y="0" width="2114" height="1000" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0002" x="0" y="1085" width="2114" height="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0003" x="2124" y="1085" width="2114" height="1081" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0004" x="4248" y="1085" width="2114" height="1081" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0005" x="4248" y="1085" width="2114" height="1081" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0006" x="0" y="2185" width="2114" height="1081" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0007" x="2124" y="2185" width="2114" height="1081" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0008" x="4248" y="2185" width="2114" height="1080" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0009" x="0" y="3276" width="2114" height="1080" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0010" x="2124" y="3276" width="2114" height="1080" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0011" x="4248" y="3276" width="2114" height="1080" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0012" x="0" y="4366" width="2114" height="1080" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0013" x="2124" y="4366" width="2114" height="1080" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0014" x="4248" y="4366" width="2114" height="1080" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0015" x="0" y="5456" width="2114" height="1079" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0016" x="2124" y="5456" width="2114" height="1079" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0017" x="4248" y="5456" width="2114" height="1079" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0018" x="0" y="6545" width="2114" height="1079" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0019" x="2124" y="6545" width="2114" height="1078" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0020" x="4248" y="6545" width="2114" height="1078" frameX="0" frameY="0" frameWidth="2114" frameHeight="1090"/>
|
||||
<SubTexture name="halloweem bg lightning strike0029" x="0" y="0" width="2114" height="1075"/>
|
||||
</TextureAtlas>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +0,0 @@
|
||||
{"ATLAS": {"SPRITES":[
|
||||
{"SPRITE" : {"name": "0000","x":2,"y":2,"w":2114,"h":1074,"rotated": false}},
|
||||
{"SPRITE" : {"name": "0001","x":2,"y":3074,"w":1037,"h":320,"rotated": false}},
|
||||
{"SPRITE" : {"name": "0002","x":2,"y":1078,"w":2111,"h":996,"rotated": false}},
|
||||
{"SPRITE" : {"name": "0003","x":1041,"y":3074,"w":594,"h":394,"rotated": false}},
|
||||
{"SPRITE" : {"name": "0004","x":2,"y":2076,"w":2094,"h":996,"rotated": false}}
|
||||
]},
|
||||
"meta": {
|
||||
"app": "Adobe Animate",
|
||||
"version": "21.0.1.37179",
|
||||
"image": "spritemap1.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {"w":2118,"h":3470},
|
||||
"resolution": "1"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 423 KiB |
@@ -13,6 +13,11 @@ import sys.FileSystem;
|
||||
using StringTools;
|
||||
|
||||
class Chart {
|
||||
/**
|
||||
* Default background colors for songs without bg color
|
||||
*/
|
||||
public inline static var defaultColor:FlxColor = 0xFF9271FD;
|
||||
|
||||
public static function loadChartMeta(songName:String, difficulty:String = "normal", fromMods:Bool = true) {
|
||||
var metaPath = Paths.file('songs/${songName.toLowerCase()}/meta.json');
|
||||
var metaDiffPath = Paths.file('songs/${songName.toLowerCase()}/meta-${difficulty.toLowerCase()}.json');
|
||||
@@ -45,7 +50,7 @@ class Chart {
|
||||
data.setFieldDefault("coopAllowed", false);
|
||||
data.setFieldDefault("opponentModeAllowed", false);
|
||||
data.setFieldDefault("displayName", data.name);
|
||||
data.setFieldDefault("parsedColor", data.color.getColorFromDynamic());
|
||||
data.setFieldDefault("parsedColor", data.color.getColorFromDynamic().getDefault(defaultColor));
|
||||
|
||||
if (data.difficulties.length <= 0) {
|
||||
data.difficulties = [for(f in Paths.getFolderContent('songs/${songName.toLowerCase()}/charts/', false, !fromMods)) if (Path.extension(f = f.toUpperCase()) == "JSON") Path.withoutExtension(f)];
|
||||
|
||||
@@ -80,7 +80,7 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||
}
|
||||
|
||||
if (!isEnding && ((!lossSFX.playing) || (character.animation.curAnim != null && character.animation.curAnim.name == "firstDeath" && character.animation.curAnim.finished)) && (FlxG.sound.music == null || !FlxG.sound.music.playing)) {
|
||||
CoolUtil.playMusic(Paths.music(gameOverSong), 100);
|
||||
CoolUtil.playMusic(Paths.music(gameOverSong), false, 1, true, 100);
|
||||
beatHit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,6 @@ using StringTools;
|
||||
|
||||
class FreeplayState extends MusicBeatState
|
||||
{
|
||||
/**
|
||||
* Default background colors for songs without bg color
|
||||
*/
|
||||
public inline static var defaultColor:FlxColor = 0xFF9271FD;
|
||||
|
||||
/**
|
||||
* How much time a song stays selected until it autoplays.
|
||||
@@ -112,9 +108,23 @@ class FreeplayState extends MusicBeatState
|
||||
|
||||
override function create()
|
||||
{
|
||||
CoolUtil.playMenuSong();
|
||||
songList = FreeplaySonglist.get();
|
||||
songs = songList.songs;
|
||||
|
||||
for(k=>s in songs) {
|
||||
if (s.name == Options.freeplayLastSong) {
|
||||
curSelected = k;
|
||||
}
|
||||
}
|
||||
if (songs[curSelected] != null) {
|
||||
for(k=>diff in songs[curSelected].difficulties) {
|
||||
if (diff == Options.freeplayLastDifficulty) {
|
||||
curDifficulty = k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DiscordUtil.changePresence("In the Menus", null);
|
||||
|
||||
// LOAD CHARACTERS
|
||||
@@ -266,6 +276,9 @@ class FreeplayState extends MusicBeatState
|
||||
|
||||
if (event.cancelled) return;
|
||||
|
||||
Options.freeplayLastSong = songs[curSelected].name;
|
||||
Options.freeplayLastDifficulty = songs[curSelected].difficulties[curDifficulty];
|
||||
|
||||
CoolUtil.loadSong(event.song, event.difficulty, event.opponentMode, event.coopMode);
|
||||
FlxG.switchState(new PlayState());
|
||||
}
|
||||
|
||||
@@ -40,6 +40,12 @@ class Options
|
||||
public static var resizableEditors:Bool = true;
|
||||
public static var maxUndos:Int = 120;
|
||||
|
||||
/**
|
||||
* QOL FEATURES
|
||||
*/
|
||||
public static var freeplayLastSong:String = null;
|
||||
public static var freeplayLastDifficulty:String = "normal";
|
||||
|
||||
// CHARTER
|
||||
public static var charterMetronomeEnabled:Bool = false;
|
||||
|
||||
|
||||
@@ -190,7 +190,8 @@ class CoolUtil
|
||||
public static function playMenuSong(fadeIn:Bool = false) {
|
||||
if (FlxG.sound.music == null || !FlxG.sound.music.playing)
|
||||
{
|
||||
playMusic(Paths.music('freakyMenu'), 102, fadeIn ? 0 : 1);
|
||||
playMusic(Paths.music('freakyMenu'), true, fadeIn ? 0 : 1, true, 102);
|
||||
FlxG.sound.music.persist = true;
|
||||
if (fadeIn)
|
||||
FlxG.sound.music.fadeIn(4, 0, 0.7);
|
||||
}
|
||||
@@ -212,14 +213,18 @@ class CoolUtil
|
||||
/**
|
||||
* Plays music, while resetting the Conductor, and taking info from INI in count.
|
||||
* @param path Path to the music
|
||||
* @param Persist Whenever the music should persist while switching states
|
||||
* @param DefaultBPM Default BPM of the music (102)
|
||||
* @param Volume Volume of the music (1)
|
||||
* @param Looped Whenever the music loops (true)
|
||||
* @param Group A group that this music belongs to (default)
|
||||
*/
|
||||
public static function playMusic(path:String, DefaultBPM:Int = 102, Volume:Int = 1, Looped:Bool = true, ?Group:FlxSoundGroup) {
|
||||
public static function playMusic(path:String, Persist:Bool = false, Volume:Int = 1, Looped:Bool = true, DefaultBPM:Int = 102, ?Group:FlxSoundGroup) {
|
||||
Conductor.reset();
|
||||
FlxG.sound.playMusic(path, Volume, Looped, Group);
|
||||
if (FlxG.sound.music != null) {
|
||||
FlxG.sound.music.persist = Persist;
|
||||
}
|
||||
|
||||
var infoPath = '${Path.withoutExtension(path)}.ini';
|
||||
if (Assets.exists(infoPath)) {
|
||||
@@ -614,6 +619,8 @@ class CoolUtil
|
||||
* @param music Music
|
||||
*/
|
||||
public static function setMusic(frontEnd:SoundFrontEnd, music:FlxSound) {
|
||||
if (frontEnd.music != null)
|
||||
@:privateAccess frontEnd.destroySound(frontEnd.music);
|
||||
frontEnd.list.remove(music);
|
||||
frontEnd.music = music;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,12 @@ class XMLUtil {
|
||||
spr.name = node.getAtt("name");
|
||||
spr.antialiasing = true;
|
||||
|
||||
spr.loadAnimatedGraphic(Paths.image('$parentFolder${node.getAtt("sprite")}', null, true));
|
||||
spr.loadSprite(Paths.image('$parentFolder${node.getAtt("sprite")}', null, true));
|
||||
|
||||
if (spr.frames != null && spr.frames.frames != null) {
|
||||
spr.animation.add("idle", [for(i in 0...spr.frames.frames.length) i], 24, true);
|
||||
spr.animation.play("idle");
|
||||
}
|
||||
|
||||
spr.spriteAnimType = defaultAnimType;
|
||||
if (node.has.type)
|
||||
|
||||
Reference in New Issue
Block a user