private void HandleSheet(IHasSheet obj) { if (obj == null) { return; } if (obj.Sheet == null) { obj.Sheet = Sheet; } if (obj.Sheet.Reference != null) { obj.Sheet = FindSheet(obj.Sheet.Reference); } }
private void ResolveSpriteReference(ref string reference, IHasSheet obj) { if (reference == null || !reference.StartsWith("[ref]")) { return; } var spr = FindSprite(reference.Substring("[ref]".Length)); if (spr.IsAnimation) { reference = "[animation]" + spr.Frame; } else { reference = spr.Frame; } obj.Sheet = spr.Sheet; }
private string ResolveSpriteReference(string reference, IHasSheet obj) { ResolveSpriteReference(ref reference, obj); return(reference); }