public ObjectProxy(XObject o) { if (o is XIterator) { itr = o as XIterator; getObject = this.GetIteratorObject; getElement = this.GetIteratorElement; getType = this.GetIteratorType; } else { obj = o; ele = o as XElement; getObject = this.GetInternalObject; getElement = this.GetInternalElement; getType = this.GetInternalType; } }
public bool Intersects(XElement e) { return this.GetScreenBounds().IntersectsWith(e.GetScreenBounds()); }
public override void Initialize(InitializeParameters p) { base.Initialize(p); this.ParentElement = this.FindAncestor(o => o is XElement) as XElement; var exploding = this as IExploding; if (exploding != null && exploding.IsExploding) { ((XLevel)this.GetScreen()).Exploding.Add(this); } }