public GameMain() { Instance = this; string path = AppSettings.Instance.GetPath("Media") + "SpaceInv"; AppSettings.Instance.AddPath("Media", path); PicRef.ScanDirectory(path); this.m_clrOffwhite = System.Drawing.Color.FromArgb(214,181,140); this.m_interfaceSprites = new ArrayList(); this.m_score = new Score(); this.m_livesLeft = new LivesLeft(); Sprite sp = new Sprite(); sp.SetGraphics("Screen"); sp.LocZ = 500; sp.Ink = RasterOps.ROPs.AddPin; this.m_interfaceSprites.Add(sp); this.AddColorizers(); this.m_covers = new ArrayList(); Cover cover; for (int nCoverNum = 0; nCoverNum < 4; nCoverNum++) { cover = new Cover(); cover.Loc = new EPointF(170 + 90 + (nCoverNum-1)*90,369); this.m_covers.Add(cover); } ERectangleF rctPlayArea = ERectangleF.FromLTRB(155,20,550,400); //new ERectangleF(145,10,350,200); //155 550 this.m_invadersGrid = new InvadersGrid(); //ERectangleF rctPlayerConstraints = rctPlayArea+ERectangleF.FromLTRB(-10,0,-55,0); this.m_player = new Player(); }
private void miGifAnim_Click(object sender, System.EventArgs e) { if (m_spDragGif == null) { m_spDragGif = new DragSprite(); m_spDragGif.SetGraphics("416"); m_spDragGif.Ink = RasterOps.ROPs.D3DTest1; m_spDragGif.LocZ = 5; m_spDragGif.Loc = new EPointF(300, 300); } else { m_spDragGif.Dispose(); m_spDragGif = null; } }
private void miDonut_Click(object sender, System.EventArgs e) { if (m_spDonut == null) { m_spDonut = new Bouncer(); m_spDonut.SetGraphics("donut"); m_spDonut.TextureFilter = Sprite.TextureFilters.High; m_spDonut.Scaling = new EPointF(4, 4); m_spDonut.Ink = RasterOps.ROPs.D3DTest2; m_spDonut.LocZ = 1; } else { m_spDonut.Dispose(); m_spDonut = null; } }