comment support for CoolUtil.cooltextFile()

This commit is contained in:
Cameron Taylor 2021-06-22 21:15:40 -04:00
parent 6add378535
commit 39d93616d2

View file

@ -24,7 +24,16 @@ class CoolUtil
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> = [];
var swagArray:Array<String> = Assets.getText(path).trim().split('\n');
for (item in swagArray)
{
// comment support in the quick lil text formats??? using //
if (!item.trim().startsWith('//'))
daList.push(item);
}
for (i in 0...daList.length) for (i in 0...daList.length)
{ {