|
|
|
|
|
|
get { return (ContainerLayer) base.parent; } |
|
|
|
} |
|
|
|
|
|
|
|
public virtual void DisposeCPter() |
|
|
|
{ |
|
|
|
if(_engineLayer != null) { |
|
|
|
_engineLayer.DisposeCPtr(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public bool _needsAddToScene = true; |
|
|
|
|
|
|
|
protected void markNeedsAddToScene() { |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
protected EngineLayer engineLayer { |
|
|
|
public EngineLayer engineLayer { |
|
|
|
if(_engineLayer != null){ |
|
|
|
_engineLayer.DisposeCPtr(); |
|
|
|
} |
|
|
|
_engineLayer = value; |
|
|
|
if (!alwaysNeedsAddToScene) { |
|
|
|
if (parent != null && !parent.alwaysNeedsAddToScene) { |
|
|
|
|
|
|
this.canvasBounds = canvasBounds; |
|
|
|
} |
|
|
|
|
|
|
|
public override void DisposeCPter() |
|
|
|
{ |
|
|
|
base.DisposeCPter(); |
|
|
|
if(_picture != null){ |
|
|
|
_picture.DisposeCPtr(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public readonly Rect canvasBounds; |
|
|
|
|
|
|
|
Picture _picture; |
|
|
|
|
|
|
return addedLayers; |
|
|
|
} |
|
|
|
|
|
|
|
public override void DisposeCPter() { |
|
|
|
base.DisposeCPter(); |
|
|
|
DisposeAllChildren(); |
|
|
|
} |
|
|
|
|
|
|
|
private void DisposeAllChildren(){ |
|
|
|
Layer child = firstChild; |
|
|
|
while (child != null) { |
|
|
|
Layer next = child.nextSibling; |
|
|
|
child.DisposeCPter(); |
|
|
|
child = next; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
internal override void updateSubtreeNeedsAddToScene() { |
|
|
|
base.updateSubtreeNeedsAddToScene(); |
|
|
|
Layer child = firstChild; |
|
|
|
|
|
|
child._nextSibling = null; |
|
|
|
child._previousSibling = null; |
|
|
|
dropChild(child); |
|
|
|
child.DisposeCPter(); |
|
|
|
D.assert(!child.attached); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
child._nextSibling = null; |
|
|
|
D.assert(child.attached == attached); |
|
|
|
dropChild(child); |
|
|
|
child.DisposeCPter(); |
|
|
|
child = next; |
|
|
|
} |
|
|
|
|
|
|
|