public Sprite IconLoader(Item item) { switch (item.Section) { case Section.EYE: return(Resourcer.SpriteLoader(Constants.EYEICONPATH + item.Name + Constants.ICONSUFFIX)); case Section.MOUTH: return(Resourcer.SpriteLoader(Constants.MOUTHICONPATH + item.Name + Constants.ICONSUFFIX)); default: return(Resourcer.SpriteLoader(Constants.OUTFITICONPATH + item.Name + Constants.ICONSUFFIX)); } }
Sprite LoadSprite(Item item) { switch (item.Section) { case Section.EYE: return(Resourcer.SpriteLoader(Constants.EYEPATH + item.Name)); case Section.MOUTH: return(Resourcer.SpriteLoader(Constants.MOUTHPATH + item.Name)); default: return(Resourcer.SpriteLoader(Constants.OUTFITPATH + item.Name)); } }
public void ShowImage() { if (lastImagePath == null) { Debug.LogError("No screenshot taken"); } else { Sprite sprite = Resourcer.SpriteLoader(Constants.SCREENSHOTPATH + lastImagePath); if (sprite == null) { return; } Holder.SetActive(true); image.sprite = sprite; } }