コード例 #1
0
 public void clear()
 {
     this.active = null;
     instance    = null;
 }
コード例 #2
0
 public static ImageManager Instance()
 {
     if (instance == null)
         instance = new ImageManager();
     return instance;
 }
コード例 #3
0
 public void clear()
 {
     this.active = null;
     instance = null;
 }
コード例 #4
0
        private void createDisplayObjs()
        {
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.Ship, 0, 0, 30, 30, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.ship), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.Ship, 0, 0, 30, 30, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.ship), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.Missile, 0, 0, 25, 10, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.missile), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.Wall, 0, 0, 10, 10, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.box), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.FencePost, 0, 0, 10, 10, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fencePost), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.Explosion, 0, 0, 10, 10, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.explosion), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.box, 0, 0, 10, 10, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.box), false)), ref this.active);

            this.privActiveAddToFront((ManLink)(new TextSprite(SpriteEnum.p1KillsText, ((XNA_Font)(TextureManager.Instance().getText(TextEnum.font).texture)).src,
                                                               "", new Vector2(110, 100), Color.White, 0.3f)), ref this.active);

            this.privActiveAddToFront((ManLink)(new TextSprite(SpriteEnum.p1DeathsText, ((XNA_Font)(TextureManager.Instance().getText(TextEnum.font).texture)).src,
                                                               "", new Vector2(103, 105), Color.White, 0.3f)), ref this.active);

            this.privActiveAddToFront((ManLink)(new TextSprite(SpriteEnum.p2KillsText, ((XNA_Font)(TextureManager.Instance().getText(TextEnum.font).texture)).src,
                                                               "", new Vector2(168, 100), Color.White, 0.3f)), ref this.active);

            this.privActiveAddToFront((ManLink)(new TextSprite(SpriteEnum.p2DeathsText, ((XNA_Font)(TextureManager.Instance().getText(TextEnum.font).texture)).src,
                                                               "", new Vector2(168, 105), Color.White, 0.3f)), ref this.active);

            this.privActiveAddToFront((ManLink)(new TextSprite(SpriteEnum.p2DeathsText, ((XNA_Font)(TextureManager.Instance().getText(TextEnum.font).texture)).src,
                                                               "", new Vector2(168, 105), Color.White, 0.3f)), ref this.active);

            this.privActiveAddToFront((ManLink)(new TextSprite(SpriteEnum.Wins, ((XNA_Font)(TextureManager.Instance().getText(TextEnum.font).texture)).src,
                                                               "", new Vector2(137, 80), Color.White, 0.8f)), ref this.active);

            this.privActiveAddToFront((ManLink)(new TextSprite(SpriteEnum.versionNum, ((XNA_Font)(TextureManager.Instance().getText(TextEnum.font).texture)).src,
                                                               "", new Vector2(208, 111), Color.White, 0.3f)), ref this.active);

            this.privActiveAddToFront((ManLink)(new TextSprite(SpriteEnum.courseNum, ((XNA_Font)(TextureManager.Instance().getText(TextEnum.font).texture)).src,
                                                               "", new Vector2(78, 111), Color.White, 0.3f)), ref this.active);

            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p1Bomb1, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.bluebomb1), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p1Bomb2, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.bluebomb1), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p1Bomb3, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.bluebomb1), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p1Bomb4, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.bluebomb1), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p1Bomb5, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.bluebomb1), false)), ref this.active);

            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p2Bomb1, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.greenbomb1), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p2Bomb2, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.greenbomb1), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p2Bomb3, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.greenbomb1), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p2Bomb4, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.greenbomb1), false)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.p2Bomb5, 0, 0, 50, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.greenbomb1), false)), ref this.active);


            // Top Walls
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence1, 0, 0, 2, 75, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence2, 0, 0, 2, 75, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence3, 0, 0, 2, 75, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence4, 0, 0, 2, 75, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);

            // Right Wall
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence5, 0, 0, 2, 95, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence6, 0, 0, 2, 95, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);

            // Left Wall
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence7, 0, 0, 2, 95, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence8, 0, 0, 2, 95, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);

            // Bottom Wall
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence9, 0, 0, 2, 75, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence10, 0, 0, 2, 75, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence11, 0, 0, 2, 75, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fence12, 0, 0, 2, 75, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);

            // Center
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fenceCTop, 0, 0, 2, 150, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fenceCBot, 0, 0, 2, 150, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fenceCLeft, 0, 0, 2, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
            this.privActiveAddToFront((ManLink)(new Sprite(SpriteEnum.fenceCRight, 0, 0, 2, 50, true, 0,
                                                           ImageManager.Instance().getImage(ImageEnum.fence1), true)), ref this.active);
        }