Exemple #1
0
        public override void Dispose()
        {
            if (this.meterBar != null)
            {
                this.meterBar.Dispose();
            }
            this.meterBar = null;

            foreach (TopologyObject topo in this.topoObjects)
            {
                topo.Dispose();
            }
            this.topoObjects.Clear();

            if (this.balls != null)
            {
                for (int i = this.balls.Count - 1; i >= 0; i--)
                {
                    Ball ball = (Ball)this.balls[i];
                    ball.Dispose();
                }
                this.balls.Clear();
            }

            base.Dispose();
        }
Exemple #2
0
        public Table()
        {
            EH.Instance.Stage.Color = System.Drawing.Color.ForestGreen;

            this.Ink = RasterOps.ROPs.BgTransparent;

            this.MemberName              = "PlayArea";
            this.ChildListChangedBefore += new ChildListChangedDelegate(Table_ChildListChangedBefore);

            this.balls = new ArrayList();

            this.topoObjects = new ArrayList();
//			TopologyObject topo;
//
//			topo = new TopologyObject();
//			topo.Loc = new EPointF(30,30);
//			topo.MaxRange = 100;
//			topo.MinRange = 0;
//			topo.Depth = -10;
//			topo.Parent = this;
//			this.topoObjects.Add(topo);
//
//			topo = new TopologyObject();
//			topo.Loc = new EPointF(200,300);
//			topo.Depth = 10;
//			topo.MaxRange = 150;
//			topo.MinRange = 10;
//			topo.Parent = this;
//			this.topoObjects.Add(topo);


            this.meterBar      = new Endogine.Forms.MeterBar();
            this.meterBar.Rect = new ERectangleF(0, 0, 100, 20);
            this.meterBar.LocZ = 100;

            try
            {
                //TODO: an extra sprite seems to be created here
                Endogine.Serialization.EndogineXML.Load(
                    EH.Instance.CastLib.DirectoryPath + "Snooker\\level1.sgr", this);
            }
            catch
            {}
        }