Small cleanup
This commit is contained in:
@@ -101,7 +101,7 @@ class AsyncUpdater {
|
||||
progress.files = files.length;
|
||||
progress.step = DOWNLOADING_ASSETS;
|
||||
trace('starting assets download');
|
||||
doFile([for(e in files) e], [for(e in fileNames) e], function() {
|
||||
doFile([for(e in files) e], fileNames.copy(), function() {
|
||||
progress.curFile = -1;
|
||||
progress.curFileName = null;
|
||||
progress.files = 1;
|
||||
|
||||
@@ -285,10 +285,12 @@ class XMLUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims and removes spacing from the nodeValue in the XML
|
||||
*
|
||||
* WARNING: will edit directly the node!
|
||||
*/
|
||||
public static function fixSpacingInNode(node:Access):Access {
|
||||
var arr = [for(x in node.x) x];
|
||||
var arr = Lambda.array(node.x);
|
||||
for(i => n in arr) {
|
||||
if(n.nodeType == PCData) {
|
||||
if(i == 0) n.nodeValue = n.nodeValue.ltrim();
|
||||
|
||||
@@ -253,7 +253,7 @@ class CharterBackdropDummy extends UISprite {
|
||||
|
||||
public override function draw() {
|
||||
@:privateAccess
|
||||
__lastDrawCameras = [for(c in cameras) c];
|
||||
__lastDrawCameras = cameras.copy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class UISprite extends FlxSprite {
|
||||
|
||||
public function drawSuper() {
|
||||
super.draw();
|
||||
__lastDrawCameras = [for(c in cameras) c];
|
||||
__lastDrawCameras = cameras.copy();
|
||||
}
|
||||
|
||||
public function drawMembers() {
|
||||
|
||||
@@ -405,11 +405,10 @@ class Character extends FunkinSprite implements IBeatReceiver implements IOffset
|
||||
if (hasInterval) beatInterval = Std.parseInt(xml.x.get("interval"));
|
||||
|
||||
var tempList = ["isPlayer", "isGF", "x", "y", "gameOverChar", "camx", "camy", "holdTime", "flipX", "icon", "color", "scale", "antialiasing", "sprite", "interval"];
|
||||
var atts = [for (i in xml.x.attributes()) i];
|
||||
var atts = xml.x.attributes();
|
||||
for (i in atts)
|
||||
if (!tempList.contains(i)) {
|
||||
if (!tempList.contains(i))
|
||||
extra[i] = xml.x.get(i);
|
||||
}
|
||||
|
||||
loadSprite(Paths.image('characters/$sprite'));
|
||||
|
||||
@@ -451,7 +450,7 @@ class Character extends FunkinSprite implements IBeatReceiver implements IOffset
|
||||
for (name in animsOrder)
|
||||
if (animDatas.exists(name)) anims.push(animDatas.get(name));
|
||||
} else
|
||||
anims = [for (anim in animDatas) anim];
|
||||
anims = Lambda.array(animDatas);
|
||||
|
||||
for (anim in anims)
|
||||
{
|
||||
|
||||
@@ -967,7 +967,7 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
if (songData == null) songData = SONG;
|
||||
|
||||
events = songData.events != null ? [for(e in songData.events) e] : [];
|
||||
events = songData.events != null ? songData.events.copy() : [];
|
||||
// get first camera focus
|
||||
for(e in events) {
|
||||
if (e.time > 10) break;
|
||||
|
||||
@@ -74,7 +74,7 @@ class Strum extends FlxSprite {
|
||||
}
|
||||
|
||||
public override function draw() {
|
||||
lastDrawCameras = [for(c in cameras) c];
|
||||
lastDrawCameras = cameras.copy();
|
||||
super.draw();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user