コード例 #1
0
ファイル: SpriteProxy.cs プロジェクト: beelandc/SpaceInvaders
        //---------------------------------------------------------------------------------------------------------
        // Methods
        //---------------------------------------------------------------------------------------------------------
        public void Set(SpriteProxy.Name proxyName, Sprite.Name spriteName)
        {
            this.name = proxyName;

            this.x = 0.0f;
            this.y = 0.0f;

            this.pSprite = SpriteManager.Find(spriteName);
            Debug.Assert(this.pSprite != null);
        }
コード例 #2
0
ファイル: SpriteProxy.cs プロジェクト: beelandc/SpaceInvaders
        public override void Clean()
        {
            this.x       = 0.0f;
            this.y       = 0.0f;
            this.sx      = 1.0f;
            this.sy      = 1.0f;
            this.name    = Name.Uninitialized;
            this.pSprite = null;

            base.Clean();
        }
コード例 #3
0
ファイル: SpriteProxy.cs プロジェクト: beelandc/SpaceInvaders
        public SpriteProxy(Sprite.Name name)
        {
            this.name = SpriteProxy.Name.Proxy;

            this.x  = 0.0f;
            this.y  = 0.0f;
            this.sx = 1.0f;
            this.sy = 1.0f;

            this.pSprite = SpriteManager.Find(name);
            Debug.Assert(this.pSprite != null);
        }
コード例 #4
0
ファイル: SpriteProxy.cs プロジェクト: beelandc/SpaceInvaders
        //---------------------------------------------------------------------------------------------------------
        // Constructors / Destructor
        //---------------------------------------------------------------------------------------------------------
        public SpriteProxy()
            : base()
        {
            this.name = SpriteProxy.Name.Uninitialized;

            this.x  = 0.0f;
            this.y  = 0.0f;
            this.sx = 1.0f;
            this.sy = 1.0f;

            this.pSprite = null;
        }
コード例 #5
0
        public static SpriteProxy Find(SpriteProxy.Name name)
        {
            SpriteProxyManager pInstance = SpriteProxyManager.PrivGetInstance();

            Debug.Assert(pInstance != null);

            // Use compare node to compare to search nodes
            pInstance.pSpriteProxyCompare.SetName(name);

            SpriteProxy pData = (SpriteProxy)pInstance.BaseFind(pInstance.pSpriteProxyCompare);

            return(pData);
        }
コード例 #6
0
        public static SpriteProxy Add(SpriteProxy.Name proxyName, Sprite.Name spriteName)
        {
            SpriteProxyManager pInstance = SpriteProxyManager.PrivGetInstance();

            Debug.Assert(pInstance != null);

            SpriteProxy pNode = (SpriteProxy)pInstance.BaseAdd();

            Debug.Assert(pNode != null);

            pNode.Set(proxyName, spriteName);

            return(pNode);
        }
コード例 #7
0
ファイル: SpriteProxy.cs プロジェクト: beelandc/SpaceInvaders
 public void SetName(Name inName)
 {
     this.name = inName;
 }