pause screen polish shit

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

View File

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

View File

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

View File

@ -6,6 +6,13 @@ using StringTools;
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>
{
var daList:Array<String> = Assets.getText(path).trim().split('\n');

View File

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

View File

@ -8,6 +8,9 @@ import flixel.addons.transition.FlxTransitionableState;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.input.keyboard.FlxKey;
import flixel.system.FlxSound;
import flixel.text.FlxText;
import flixel.tweens.FlxEase;
import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
class PauseSubState extends MusicBeatSubstate
@ -30,10 +33,24 @@ class PauseSubState extends MusicBeatSubstate
FlxG.sound.list.add(pauseMusic);
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
bg.alpha = 0.6;
bg.alpha = 0;
bg.scrollFactor.set();
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>();
add(grpMenuShit);