Esempio n. 1
0
 public static CozySpriteTiled Create(CozyTexture texture, Rectangle rect)
 {
     var tiled = new CozySpriteTiled();
     tiled.Texture = texture;
     tiled.Rect = rect;
     return tiled;
 }
 public void Modify(uint id, CozyTexture texture)
 {
     if (TextureDictionary.ContainsKey(id))
     {
         TextureDictionary[id] = texture;
     }
 }
Esempio n. 3
0
        public static CozySpriteTiled Create(CozyTexture texture, Rectangle rect)
        {
            var tiled = new CozySpriteTiled();

            tiled.Texture = texture;
            tiled.Rect    = rect;
            return(tiled);
        }
Esempio n. 4
0
 public override bool InitWithTexture(CozyTexture texture)
 {
     if (!base.InitWithTexture(texture))
     {
         return(false);
     }
     return(true);
 }
Esempio n. 5
0
 public TileButton(CozyTexture texture, Rectangle SourceRect)
 {
     PreferredHeight = 32;
     PreferredWidth  = 32;
     Margin          = new Starbound.UI.Thickness(3, 3, 0, 0);
     Content         = new XNAImageResource(texture.Get());
     SourcePosition  = new Starbound.UI.Vector2(SourceRect.X, SourceRect.Y);
     SourceSize      = new Starbound.UI.Vector2(SourceRect.Width, SourceRect.Height);
 }
Esempio n. 6
0
        public static new CozyTileSprite Create(CozyTexture texture)
        {
            var sp = new CozyTileSprite();

            if (!sp.InitWithTexture(texture))
            {
                return(null);
            }
            return(sp);
        }
 public void Add(uint id, CozyTexture texture)
 {
     TextureDictionary[id] = texture;
 }
Esempio n. 8
0
 private Tuple <uint, CozyTiledNode> CreateTiledNodeTuple(uint id, CozyTexture texture, Rectangle rect)
 {
     return(Tuple.Create <uint, CozyTiledNode>(id, CozySpriteTiled.Create(texture, rect)));
 }