Repe [T3DU] Update - 31f26d171bba0355ce2a77031e3aad4c64dbc7e9

This commit is contained in:
2026-09-04 10:46:13 -07:00
parent c915312901
commit 0460b9d587
482 changed files with 27797 additions and 3226 deletions

View File

@ -27,7 +27,6 @@ class Object {
public var culled = false; // Object was culled last frame
public var culledMesh = false;
public var culledShadow = false;
public var vertex_groups: Map<String, Array<Vec4>> = null;
public var properties: Map<String, Dynamic> = null;
var isEmpty = false;
@ -95,6 +94,7 @@ class Object {
Removes the game object from the scene.
**/
public function remove() {
Scene.active.removeFromGroups(this);
if (isEmpty && Scene.active != null) Scene.active.empties.remove(this);
if (animation != null) animation.remove();
while (children.length > 0) children[0].remove();
@ -111,16 +111,12 @@ class Object {
@return Object or null
**/
public function getChild(name: String): Object {
if (this.name == name) return this;
else if (this.filename != "") {
if (this.name == name + "_" + this.filename) return this;
}
for (c in children) {
if (c.name == name) return c;
if (c.filename != "" && c.name == name + "_" + c.filename) return c;
var r = c.getChild(name);
if (r != null) return r;
}
return null;
}
@ -145,12 +141,10 @@ class Object {
}
public function getChildOfType<T: Object>(type: Class<T>): T {
if (Std.isOfType(this, type)) return cast this;
else {
for (c in children) {
var r = c.getChildOfType(type);
if (r != null) return r;
}
for (c in children) {
if (Std.isOfType(c, type)) return cast c;
var r = c.getChildOfType(type);
if (r != null) return r;
}
return null;
}