Ejemplo n.º 1
0
 public Sprite(SpriteSheet _ParrentMapedSheet, TilesheetColectionItem _sprites)
 {
     ParrentSpriteSheet = _ParrentMapedSheet;
     MainSprite         = _sprites;
     sprites            = new TilesheetColectionItem[1];
     sprites[0]         = _sprites;
 }
Ejemplo n.º 2
0
        public Sprite GetSprite(string _SpriteName)
        {
            if (SpriteColection.ContainsKey(_SpriteName))
            {
                TilesheetColectionItem sI = SpriteColection[_SpriteName];

                if (sI.Animated == true)
                {
                    TilesheetColectionItem[] Frames = new TilesheetColectionItem[sI.Frames.Count()];

                    for (int I = 0; I < sI.Frames.Length; I++)
                    {
                        Frames[I] = SpriteColection[sI.Frames[I]];
                    }

                    return(new Sprite(this, sI, Frames));
                }
                else
                {
                    return(new Sprite(this, sI));
                }
            }
            else
            {
                Debug.Logs.Write("[SpriteMapParse] Missing Sprite '" + _SpriteName + "'", Debug.LogType.Warning);
                return(null);
            }
        }
Ejemplo n.º 3
0
 public Sprite(SpriteSheet _ParrentMapedSheet, TilesheetColectionItem _MainSprite, TilesheetColectionItem[] _sprites)
 {
     ParrentSpriteSheet = _ParrentMapedSheet;
     MainSprite         = _MainSprite;
     sprites            = _sprites;
 }