public Sprite(SpriteSheet _ParrentMapedSheet, TilesheetColectionItem _sprites) { ParrentSpriteSheet = _ParrentMapedSheet; MainSprite = _sprites; sprites = new TilesheetColectionItem[1]; sprites[0] = _sprites; }
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); } }
public Sprite(SpriteSheet _ParrentMapedSheet, TilesheetColectionItem _MainSprite, TilesheetColectionItem[] _sprites) { ParrentSpriteSheet = _ParrentMapedSheet; MainSprite = _MainSprite; sprites = _sprites; }