public void set(SpriteEnum sName, ImageEnum iName, Index index = Index.Index_Null)
 {
     this.name = sName;
     this.index = index;
     sprite = GameSpriteManager.find(sName, index);
     imgToSwap = ImageManager.find(iName);
 }
Example #2
0
 public Image()
     : base()
 {
     tex = null;
     texCoords = null;
     index = Index.Index_Null;
     name = ImageEnum.Not_Initialized;
 }
Example #3
0
 public void set(SpriteEnum sName, Index index, ImageEnum iName, float x, float y, float width, float height)
 {
     base.setBase(sName, index, x, y);
     this.img = ImageManager.find(iName);
     this.sprite = new Azul.Sprite2D(this.img.getTexture(), this.img.TexCoords, new Azul.Rect(x, y, width, height));
     this.sprRect = new Azul.Rect(x, y, width, height);
     angle = 0;
     scaleX = this.sprite.sx;
     scaleY = this.sprite.sy;
 }
 protected void UpdateImageProperty(ImageEnum imageEnum, BitmapImage image)
 {
     switch (imageEnum)
       {
     case ImageEnum.Main:
       StatusImage = image;
       OnPropertyChanged("MainImage");
       break;
       }
 }
 public void SetImage(string imagePath, ImageEnum imageEnum)
 {
     var image = new BitmapImage(new Uri(BaseUri, imagePath));
       UpdateImageProperty(imageEnum, image);
 }
Example #6
0
 public void setImage(ImageEnum iName, TexEnum tName, float x, float y, float width, float height)
 {
     name = iName;
     tex = TextureManager.find(tName);
     texCoords = new Azul.Rect(x, y, width, height);
 }
Example #7
0
 public void DrawImage(Graphics gr, RectangleF size, ImageEnum en)
 {
     gr.DrawImage(imageObject[en], size);
 }
Example #8
0
 public Image()
 {
     sourceRec = new Rectangle();
     texture = null;
     ImageName = ImageEnum.Not_Initialized;
 }
Example #9
0
 public Image(ImageEnum _name, int x, int y, int w, int h, Text text)
 {
     sourceRec = new Rectangle(x, y, w, h);
     texture = text;
     ImageName = _name;
 }
        public static void add(SpriteEnum sName, Index index, ImageEnum iName, float x, float y, float width, float height)
        {
            GameSprite sprite = (GameSprite)Instance.baseAdd();

            sprite.set(sName, index, iName, x, y, width, height);
        }
Example #11
0
 public static void remove(ImageEnum imgName)
 {
     Instance.baseRemove(imgName);
 }
Example #12
0
 public static Image find(ImageEnum imgName)
 {
     return (Image)Instance.baseFind(imgName);
 }
Example #13
0
        public static void add(ImageEnum imgName, TexEnum tex, float x, float y, float width, float height)
        {
            Image toAdd = (Image)Instance.baseAdd();

            toAdd.setImage(imgName, tex, x, y, width, height);
        }
Example #14
0
 public Image getImage(ImageEnum _enum)
 {
     return (Image)privFind(_enum);
 }