mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-15 09:06:53 +00:00
36 lines
538 B
Haxe
36 lines
538 B
Haxe
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;
|
|
}
|
|
}
|