Skip to content

Commit

Permalink
Fix 2d-inc#40
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Smania committed Feb 4, 2019
1 parent a24291e commit 1d01561
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions flare_dart/lib/actor_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ActorClip {
}

class ActorNode extends ActorComponent {
List<ActorNode> _children;
List<ActorNode> _children = List<ActorNode>();
//List<ActorNode> m_Dependents;
Mat2D _transform = Mat2D();
Mat2D _worldTransform = Mat2D();
Expand Down Expand Up @@ -181,7 +181,7 @@ class ActorNode extends ActorComponent {
ActorNode clipSearch = this;
while (clipSearch != null) {
if (clipSearch.clips != null) {
all.add(clipSearch.clips);
all.add(clipSearch.clips);
}
clipSearch = clipSearch.parent;
}
Expand Down Expand Up @@ -257,9 +257,6 @@ class ActorNode extends ActorComponent {
node.parent._children.remove(node);
}
node.parent = this;
if (_children == null) {
_children = List<ActorNode>();
}
_children.add(node);
}

Expand Down Expand Up @@ -359,15 +356,13 @@ class ActorNode extends ActorComponent {
}

bool eachChildRecursive(NodeWalkCallback cb) {
if (_children != null) {
for (ActorNode child in _children) {
if (cb(child) == false) {
return false;
}
for (ActorNode child in _children) {
if (cb(child) == false) {
return false;
}

if (child.eachChildRecursive(cb) == false) {
return false;
}
if (child.eachChildRecursive(cb) == false) {
return false;
}
}
return true;
Expand Down

0 comments on commit 1d01561

Please sign in to comment.