Exemple #1
0
        //set all method

        public void setAll(SpriteBoxName spriteBoxName, Azul.Rect spriteBoxRect)
        {
            this.cSpriteBoxName = spriteBoxName;
            this.cSpriteBoxRect = spriteBoxRect;
            //    this.cSpriteBoxColor = cDefColor;
            this.cSpriteBoxColor.Set(cDefColor.red, cDefColor.green, cDefColor.blue);
            this.azulSpriteBox.Swap(spriteBoxRect, this.cSpriteBoxColor);

            this.x     = azulSpriteBox.x;
            this.y     = azulSpriteBox.y;
            this.sx    = azulSpriteBox.sx;
            this.sy    = azulSpriteBox.sy;
            this.angle = azulSpriteBox.angle;
            //this.azulSpriteBox = new Azul.SpriteBox(spriteBoxRect, spriteBoxColor);
        }
Exemple #2
0
        public void wash()
        {
            this.cSpriteBoxName = SpriteBox.SpriteBoxName.Uninitilized;
            // this.cSpriteBoxColor = new Azul.Color(cDefColor);
            //  this.cSpriteBoxColor = cDefColor ;
            Debug.Assert(this.cSpriteBoxColor != null);

            // this.azulSpriteBox.Swap(cDefScreenRect, cDefColor);
            Debug.Assert(this.azulSpriteBox != null);

            this.x     = azulSpriteBox.x;
            this.y     = azulSpriteBox.y;
            this.sx    = azulSpriteBox.sx;
            this.sy    = azulSpriteBox.sy;
            this.angle = azulSpriteBox.angle;
        }
Exemple #3
0
        public SpriteBox()
        {
            this.cSpriteBoxName  = SpriteBox.SpriteBoxName.Uninitilized;
            this.cSpriteBoxRect  = new Azul.Rect(cDefScreenRect);
            this.cSpriteBoxColor = new Azul.Color();
            // this.cSpriteBoxColor = cDefColor;

            Debug.Assert(this.cSpriteBoxColor != null);

            this.azulSpriteBox = new Azul.SpriteBox(this.cSpriteBoxRect, this.cSpriteBoxColor);
            Debug.Assert(this.azulSpriteBox != null);

            this.x     = azulSpriteBox.x;
            this.y     = azulSpriteBox.y;
            this.sx    = azulSpriteBox.sx;
            this.sy    = azulSpriteBox.sy;
            this.angle = azulSpriteBox.angle;
        }
Exemple #4
0
        public void Set(SpriteBox.SpriteBoxName boxName, float x, float y, float width, float height)
        {
            Debug.Assert(cDefScreenRect != null);
            //Debug.Assert(cDefColor != null);
            Debug.Assert(this.azulSpriteBox != null);
            Debug.Assert(this.cSpriteBoxRect != null);

            this.cSpriteBoxName = boxName;

            // this.cSpriteBoxColor.Set(cDefColor);
            //   this.cSpriteBoxColor.Set(cDefColor.red, cDefColor.green, cDefColor.blue);
            this.cSpriteBoxRect.Set(x, y, width, height);

            this.azulSpriteBox.Swap(this.cSpriteBoxRect, this.cSpriteBoxColor);

            Debug.Assert(this.azulSpriteBox != null);

            this.x     = azulSpriteBox.x;
            this.y     = azulSpriteBox.y;
            this.sx    = azulSpriteBox.sx;
            this.sy    = azulSpriteBox.sy;
            this.angle = azulSpriteBox.angle;
        }
Exemple #5
0
 public SpriteBox(SpriteBoxName spriteBoxName, Azul.Rect spriteBoxRect)
 {
     setAll(spriteBoxName, spriteBoxRect);
 }