newgrounds io shit incoming

This commit is contained in:
Cameron Taylor
2020-10-31 20:42:14 -07:00
parent b16b463dad
commit 321a7d22f9
35 changed files with 3049 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
package io.newgrounds.swf.common;
import openfl.events.Event;
import openfl.display.MovieClip;
class BaseAsset extends MovieClip {
var _coreReady:Bool = false;
public function new() {
super();
setDefaults();
if (stage != null)
onAdded(null);
else
addEventListener(Event.ADDED_TO_STAGE, onAdded);
}
function setDefaults():Void { }
function onAdded(e:Event):Void {
if (NG.core != null)
onReady();
else
NG.onCoreReady.add(onReady);
}
function onReady():Void {
_coreReady = true;
}
}