Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public override void RemoveAllChildren(bool cleanup)
 {
     ParallaxArray.Clear();
     base.RemoveAllChildren(cleanup);
 }