Esempio n. 1
0
        public override void Draw()
        {
            SBNodeManager pSB_Man = this.GameOverSceneSpriteBatch.GetSBNodeManager();

            pSB_Man.Draw();
            InputManager.Update();
        }
Esempio n. 2
0
        public static void Remove(SBNode pSBNode)
        {
            Debug.Assert(pSBNode != null);
            SBNodeManager pSBNodeMan = pSBNode.GetBackToSBNodeManager();

            Debug.Assert(pSBNodeMan != null);
            pSBNodeMan.Remove(pSBNode);
        }
Esempio n. 3
0
 public SpriteBatch()
     : base()
 {
     //set the default blank name and create a new SBNodeManager
     this.name       = Name.Blank;
     this.pSBNodeMan = new SBNodeManager();
     Debug.Assert(this.pSBNodeMan != null);
 }
Esempio n. 4
0
        public void Set(SpriteBase pNode, SBNodeManager pSBNodeMan)
        {
            Debug.Assert(pNode != null);
            Debug.Assert(pSBNodeMan != null);

            this.pSpriteBase = pNode;
            this.pSpriteBase.SetBackToSBNode(this);
            this.pBackToSBNodeManager = pSBNodeMan;
        }
Esempio n. 5
0
        /*
         *      public void Set(GameSprite.Name targetSpriteName, SBNodeManager _pSBNodeMan, Boolean render = true)
         *      {
         *          // Go find it
         *          this.pSpriteBase = GameSpriteManager.Find(targetSpriteName);
         *
         *          Debug.Assert(_pSBNodeMan != null);
         *          this.pSBNodeManager = _pSBNodeMan;
         *
         *          Debug.Assert(this.pSpriteBase != null);
         *
         *          //set whether to render the sprite
         *          this.pSpriteBase.render = render;
         *      }
         *      //todo verify that setting the render value for sprite base to default as true screws anything up
         *      public void Set(BoxSprite.Name targetBoxName, SBNodeManager _pSBNodeMan, Boolean render = true)
         *      {
         *          // Go find it
         *          this.pSpriteBase = BoxSpriteManager.Find(targetBoxName);
         *
         *          Debug.Assert(_pSBNodeMan != null);
         *          this.pSBNodeManager = _pSBNodeMan;
         *
         *          Debug.Assert(this.pSpriteBase != null);
         *
         *          //set whether to render the box sprite
         *          this.pSpriteBase.render = render;
         *      }
         *
         * public void Set(ProxySprite pNode, SBNodeManager _pSBNodeMan)
         *      {
         *          // associate it
         *          Debug.Assert(pNode != null);
         *
         *          // Should verify that (pNode) its real and active?
         *          this.pSpriteBase = pNode;
         *          Debug.Assert(this.pSpriteBase != null);
         *
         *          Debug.Assert(_pSBNodeMan != null);
         *          this.pSBNodeManager = _pSBNodeMan;
         *      }
         */
        public void Set(SpriteBase pNode, SBNodeManager _pSBNodeMan)
        {
            Debug.Assert(pNode != null);
            Debug.Assert(_pSBNodeMan != null);

            this.pSpriteBase    = pNode;
            this.pSBNodeManager = _pSBNodeMan;

            // Set the back pointer
            // Allows easier deletion in the future
            Debug.Assert(pSpriteBase != null);
            this.pSpriteBase.SetSBNode(this);
        }
Esempio n. 6
0
        //public void Detach(SpriteBase pNode)
        //{
        //    Debug.Assert(pNode != null);
        //    SBNode pSBNode = this.Find(pNode);
        //    //if(pSBNode == null)
        //    //{
        //    //    Debug.Assert(true);
        //    //}
        //    this.BaseRemove(pSBNode);

        //}

        public void Detach(SpriteBase pSB)
        {
            Debug.Assert(pSB != null);
            SBNode pSBNode = pSB.GetBackToSBNode();

            pSB.pBackToSBNode = null;

            SBNodeManager pMan = pSBNode.GetBackToSBNodeManager();

            pSBNode.pBackToSBNodeManager = null;

            pMan.Remove(pSBNode);
            //this.poSBNodeMan.Detach(pNode);
        }
Esempio n. 7
0
        public static void Draw()
        {
            SpriteBatchManager pMan = SpriteBatchManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            SpriteBatch pSpriteBatch = (SpriteBatch)pMan.BaseGetActive();

            while (pSpriteBatch != null)
            {
                SBNodeManager pSBNodeMan = pSpriteBatch.GetSBNodeManager();
                Debug.Assert(pSBNodeMan != null);

                pSBNodeMan.Draw();

                pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext;
            }
        }
Esempio n. 8
0
 public SBNode()
     : base()
 {
     this.pSpriteBase    = null;
     this.pSBNodeManager = null;
 }