Skip to content

Commit

Permalink
Fixed Node destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGorisse committed Sep 5, 2023
1 parent 9bd1e3d commit 415997c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class NodeManager(val engine: Engine) {
}

fun destroy() {
entities.forEach { entity ->
entities.toList().forEach { entity ->
destroyNode(entity)
}
entities.clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ open class Node(
}

open fun destroy() {
childNodes.forEach {
childNodes.toList().forEach {
removeChildNode(it)
it.destroy()
}
Expand Down

0 comments on commit 415997c

Please sign in to comment.