forked from LeenkxTeam/LNXSDK
Repe [T3DU] Update - 31f26d171bba0355ce2a77031e3aad4c64dbc7e9
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
package iron.object;
|
||||
|
||||
import iron.App;
|
||||
import iron.Scene;
|
||||
import iron.data.SceneFormat;
|
||||
import iron.system.Time;
|
||||
import haxe.ds.Map;
|
||||
|
||||
|
||||
@:allow(iron.Scene)
|
||||
class Tilesheet {
|
||||
|
||||
public var tileX: Float = 0.0;
|
||||
@ -14,7 +15,8 @@ class Tilesheet {
|
||||
public var flipY: Bool = false;
|
||||
public var paused: Bool = false;
|
||||
public var frame: Int = 0;
|
||||
public var actions: Array<TTilesheetAction>;
|
||||
public var raw: TTilesheetData = null;
|
||||
public var actions: Array<TTilesheetAction> = null;
|
||||
public var action: TTilesheetAction = null;
|
||||
|
||||
public var ready: Bool = false;
|
||||
@ -31,8 +33,11 @@ class Tilesheet {
|
||||
|
||||
public function new(tilesheetData: TTilesheetData, ownerObject: MeshObject = null) {
|
||||
owner = ownerObject;
|
||||
raw = tilesheetData;
|
||||
actions = tilesheetData.actions;
|
||||
|
||||
Scene.active.tilesheets.push(this);
|
||||
|
||||
pendingAction = tilesheetData.start_action;
|
||||
if ((pendingAction == null || pendingAction == "") && actions.length > 0) {
|
||||
pendingAction = actions[0].name;
|
||||
@ -262,8 +267,10 @@ class Tilesheet {
|
||||
}
|
||||
|
||||
public function remove() {
|
||||
Scene.active.tilesheets.remove(this);
|
||||
ready = false;
|
||||
action = null;
|
||||
raw = null;
|
||||
actions = null;
|
||||
owner = null;
|
||||
currentMesh = null;
|
||||
|
||||
Reference in New Issue
Block a user