pause screen polish shit

This commit is contained in:
Cameron Taylor 2021-03-01 23:00:02 -05:00
parent 05da693f68
commit 3d46cdcb77
5 changed files with 84 additions and 66 deletions

View File

@ -18,5 +18,6 @@ bbpanzu
Etika Etika
Foamymuffin (insert travis scott lyrics here) Foamymuffin (insert travis scott lyrics here)
SiIvaGunner SiIvaGunner
Masaya Matsuura
BIT BOY - MIKE WELSH BIT BOY - MIKE WELSH

View File

@ -1,8 +1,8 @@
package; package;
import Conductor.BPMChangeEvent;
import Section.SwagSection; import Section.SwagSection;
import Song.SwagSong; import Song.SwagSong;
import Conductor.BPMChangeEvent;
import flixel.FlxG; import flixel.FlxG;
import flixel.FlxSprite; import flixel.FlxSprite;
import flixel.addons.display.FlxGridOverlay; import flixel.addons.display.FlxGridOverlay;
@ -454,14 +454,14 @@ class ChartingState extends MusicBeatState
else else
return _song.notes[curSection].lengthInSteps; return _song.notes[curSection].lengthInSteps;
}*/ }*/
function sectionStartTime():Float function sectionStartTime():Float
{ {
var daBPM:Int = _song.bpm; var daBPM:Int = _song.bpm;
var daPos:Float = 0; var daPos:Float = 0;
for (i in 0...curSection) for (i in 0...curSection)
{ {
if (_song.notes[i].changeBPM) { if (_song.notes[i].changeBPM)
{
daBPM = _song.notes[i].bpm; daBPM = _song.notes[i].bpm;
} }
daPos += 4 * (1000 * 60 / daBPM); daPos += 4 * (1000 * 60 / daBPM);
@ -997,7 +997,6 @@ class ChartingState extends MusicBeatState
return daLength; return daLength;
}*/ }*/
private var daSpacing:Float = 0.3; private var daSpacing:Float = 0.3;
function loadLevel():Void function loadLevel():Void

View File

@ -6,6 +6,13 @@ using StringTools;
class CoolUtil class CoolUtil
{ {
public static var difficultyArray:Array<String> = ['EASY', "NORMAL", "HARD"];
public static function difficultyString():String
{
return difficultyArray[PlayState.storyDifficulty];
}
public static function coolTextFile(path:String):Array<String> public static function coolTextFile(path:String):Array<String>
{ {
var daList:Array<String> = Assets.getText(path).trim().split('\n'); var daList:Array<String> = Assets.getText(path).trim().split('\n');

View File

@ -1,10 +1,9 @@
package; package;
import openfl.utils.Assets as OpenFlAssets;
import openfl.utils.AssetType;
import flixel.FlxG; import flixel.FlxG;
import flixel.graphics.frames.FlxAtlasFrames; import flixel.graphics.frames.FlxAtlasFrames;
import openfl.utils.AssetType;
import openfl.utils.Assets as OpenFlAssets;
class Paths class Paths
{ {
@ -38,21 +37,16 @@ class Paths
static public function getLibraryPath(file:String, library = "preload") static public function getLibraryPath(file:String, library = "preload")
{ {
return if (library == "preload" || library == "default") return if (library == "preload" || library == "default") getPreloadPath(file); else getLibraryPathForce(file, library);
getPreloadPath(file);
else
getLibraryPathForce(file, library);
} }
inline static function getLibraryPathForce(file:String, library:String) inline static function getLibraryPathForce(file:String, library:String)
{ {
return '$library:assets/$library/$file'; return '$library:assets/$library/$file';
} }
inline static function getPreloadPath(file:String) inline static function getPreloadPath(file:String)
{ {
return 'assets/$file'; return 'assets/$file';
} }

View File

@ -8,6 +8,9 @@ import flixel.addons.transition.FlxTransitionableState;
import flixel.group.FlxGroup.FlxTypedGroup; import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.input.keyboard.FlxKey; import flixel.input.keyboard.FlxKey;
import flixel.system.FlxSound; import flixel.system.FlxSound;
import flixel.text.FlxText;
import flixel.tweens.FlxEase;
import flixel.tweens.FlxTween;
import flixel.util.FlxColor; import flixel.util.FlxColor;
class PauseSubState extends MusicBeatSubstate class PauseSubState extends MusicBeatSubstate
@ -30,10 +33,24 @@ class PauseSubState extends MusicBeatSubstate
FlxG.sound.list.add(pauseMusic); FlxG.sound.list.add(pauseMusic);
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK); var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
bg.alpha = 0.6; bg.alpha = 0;
bg.scrollFactor.set(); bg.scrollFactor.set();
add(bg); add(bg);
var levelInfo:FlxText = new FlxText(20, 15, 0, "", 32);
levelInfo.text += PlayState.SONG.song;
levelInfo.text += '\n' + CoolUtil.difficultyString();
levelInfo.scrollFactor.set();
levelInfo.setFormat(Paths.font("vcr.ttf"), 32);
levelInfo.updateHitbox();
add(levelInfo);
levelInfo.alpha = 0;
levelInfo.x = FlxG.width - (levelInfo.width + 20);
FlxTween.tween(bg, {alpha: 0.6}, 0.4, {ease: FlxEase.quartInOut});
FlxTween.tween(levelInfo, {alpha: 1, y: 20}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.3});
grpMenuShit = new FlxTypedGroup<Alphabet>(); grpMenuShit = new FlxTypedGroup<Alphabet>();
add(grpMenuShit); add(grpMenuShit);