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; m_pParallaxArray.Add(obj); CCPoint pos = m_obPosition; pos.X = pos.X * ratio.X + offset.X; pos.Y = pos.Y * ratio.Y + offset.Y; child.Position = pos; base.AddChild(child, z, child.Tag); }
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; m_pParallaxArray.Add(obj); CCPoint pos = m_tPosition; pos.X = pos.X * ratio.X + offset.X; pos.Y = pos.Y * ratio.Y + offset.Y; child.Position = pos; base.AddChild(child, z, child.Tag); }