Funkin/source/CoolUtil.hx

38 lines
676 B
Haxe
Raw Normal View History

2021-01-14 23:33:12 -05:00
package;
import lime.utils.Assets;
using StringTools;
class CoolUtil
{
2021-03-01 23:00:02 -05:00
public static var difficultyArray:Array<String> = ['EASY', "NORMAL", "HARD"];
public static function difficultyString():String
{
return difficultyArray[PlayState.storyDifficulty];
}
2021-01-14 23:33:12 -05:00
public static function coolTextFile(path:String):Array<String>
{
var daList:Array<String> = Assets.getText(path).trim().split('\n');
for (i in 0...daList.length)
{
daList[i] = daList[i].trim();
}
return daList;
}
2021-01-25 05:04:31 -05:00
public static function numberArray(max:Int, ?min = 0):Array<Int>
{
var dumbArray:Array<Int> = [];
for (i in min...max)
{
dumbArray.push(i);
}
return dumbArray;
}
2021-01-14 23:33:12 -05:00
}