Esempio n. 1
0
 public BombFactory(SpriteBatchName sbName, PCSTree tree)
 {
     this.pSpriteBatch = SpriteBatchManager.Find(sbName);
     Debug.Assert(this.pSpriteBatch != null);
     this.pTree = tree;
     Debug.Assert(this.pTree != null);
 }
Esempio n. 2
0
 public AlienFactory(SpriteBatchName sbName, PCSTree tree)
 {
     this.pSpriteBatch    = SpriteBatchManager.Find(sbName);
     this.pSpriteBoxBatch = SpriteBatchManager.Find(SpriteBatchName.Boxes);
     Debug.Assert(this.pSpriteBatch != null);
     this.pTree = tree;
 }
Esempio n. 3
0
        public static SpriteBatch Add(SpriteBatchName spriteBatchName)
        {
            SpriteBatchManager spBatchMan = SpriteBatchManager.GetInstance();
            SpriteBatch        spBatch    = (SpriteBatch)spBatchMan.BaseAdd();

            spBatch.name = spriteBatchName;
            return(spBatch);
        }
Esempio n. 4
0
 public AlienFactory(SpriteBatchName sbName, PCSTree tree, Random random)
 {
     this.pSpriteBatch = SpriteBatchManager.Find(sbName);
     Debug.Assert(this.pSpriteBatch != null);
     this.pTree = tree;
     Debug.Assert(this.pTree != null);
     this.pRandom = random;
 }
Esempio n. 5
0
        public static SpriteBatch Find(SpriteBatchName spriteBatchName)
        {
            SpriteBatchManager spMan   = SpriteBatchManager.GetInstance();
            SpriteBatch        spBatch = (SpriteBatch)spMan.BaseFind(new SpriteBatch {
                name = spriteBatchName
            });

            return(spBatch);
        }
Esempio n. 6
0
        public ShieldFactory(SpriteBatchName sbName, SpriteBatchName collisionSBName, PCSTree pTree)
        {
            this.pSpriteBatch = SpriteBatchManager.Find(sbName);
            Debug.Assert(this.pSpriteBatch != null);

            this.pCollisionSpriteBatch = SpriteBatchManager.Find(collisionSBName);
            Debug.Assert(this.pCollisionSpriteBatch != null);

            Debug.Assert(pTree != null);
            this.pTree = pTree;
        }
Esempio n. 7
0
        public DrawBatch(SpriteBatch inspriteBatch, GraphicsDevice ingraphicDevice, SpriteSortMode inSort, BlendState inBlend, SpriteBatchName inName, int buffersize = 10, int delta = 3)
        {
            GameSprites = new LinkedList(buffersize, delta, NodeType.GameSpr);
            DeltaGrow   = delta;

            spriteBatch    = inspriteBatch;
            graphicDevices = ingraphicDevice;
            sortMode       = inSort;
            blendState     = inBlend;
            Name           = inName;
            _isActive      = true;
        }
Esempio n. 8
0
        public void Kill(ColObj inObj)
        {
            SpriteBatchName inSpName = SpriteBatchName.Collisions;

            GameSprite _gameSprite = inObj.getColSprite();

            SpriteBatchManager.getInstance().Kill(_gameSprite, inSpName);
            ListNode KillNode = Find(inObj);

            if (KillNode != null)
            {
                List.Remove(KillNode);
            }
        }
        public DrawBatch Find(SpriteBatchName inName)
        {
            int index = 0;

            DrawBatch Obj = (DrawBatch)List.getDatabyIndex(index);

            while (Obj != null)
            {
                if (Obj.getName() == inName)
                {
                    return(Obj);
                }

                index++;
                Obj = (DrawBatch)List.getDatabyIndex(index);
            }

            return(null);
        }
        public void KillObject(GameObj inObj, SpriteBatchName inSpName)
        {
            GameSprite _gameSprite = inObj.getGameSprite();

            if (_gameSprite != null)
            {
                SpriteBatchManager.getInstance().Kill(_gameSprite, inSpName);
            }

            ColObj _colObj = inObj.getColObj();

            if (_colObj != null)
            {
                ColObjManager.getInstance().Kill(_colObj);
            }

            ColGroup _ColGroup = ColGroupManager.getInstance().find(inObj.TempColGroupName);

            _ColGroup.Kill(inObj);

            Kill(inObj);
        }
Esempio n. 11
0
 public void Set(SpriteBatchName name, int reserveSize, int reserveIncrement)
 {
     this.name = name;
     this.FillReserve(reserveSize);
 }
        public void Kill(GameSprite inGSprite, SpriteBatchName inSpName)
        {
            DrawBatch DB = this.Find(inSpName);

            DB.Kill(inGSprite);
        }