public override void RemoveChild(CCNode child, bool cleanup) { foreach (CCPointObject pointObj in ParallaxArray) { if (pointObj.Child == child) { ParallaxArray.Remove(pointObj); break; } } base.RemoveChild(child, cleanup); }
public virtual void AddChild(CCNode child, int z, CCPoint ratio, CCPoint offset) { Debug.Assert(child != null, "Argument must be non-nil"); CCPointObject obj = new CCPointObject(ratio, offset); obj.Child = child; ParallaxArray.Add(obj); CCPoint pos = Position; pos *= (ratio + offset); child.Position = pos; base.AddChild(child, z, child.Tag); }
public override void RemoveAllChildren(bool cleanup) { ParallaxArray.Clear(); base.RemoveAllChildren(cleanup); }