Sprite GetJobIconSprite(JobLabel label) { var pattern = "{0} => {1}"; switch (label) { case JobLabel.Swordman: return(_spriteHelper.Get(string.Format(pattern, iconJobUILocation, "icon_swordman"))); case JobLabel.Archer: return(_spriteHelper.Get(string.Format(pattern, iconJobUILocation, "icon_archer"))); case JobLabel.Healer: return(_spriteHelper.Get(string.Format(pattern, iconJobUILocation, "icon_healer"))); case JobLabel.Mage: return(_spriteHelper.Get(string.Format(pattern, iconJobUILocation, "icon_mage"))); default: break; } return(null); }
IEnumerator LoadResourcesAtFirstTime() { var pattern = "{0} => {1}"; spriteHelper.Get(string.Format(pattern, string.Format(headSpriteLoc, "A"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(eyeSpriteLoc, "A"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(mouthSpriteLoc, "A"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(bodySpriteLoc, "A"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(armSpriteLoc, "A"), "l_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(armSpriteLoc, "A"), "r_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(legSpriteLoc, "A"), "l_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(legSpriteLoc, "A"), "r_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(headSpriteLoc, "S"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(eyeSpriteLoc, "S"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(mouthSpriteLoc, "S"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(bodySpriteLoc, "S"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(armSpriteLoc, "S"), "l_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(armSpriteLoc, "S"), "r_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(legSpriteLoc, "S"), "l_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(legSpriteLoc, "S"), "r_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(headSpriteLoc, "Common"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(eyeSpriteLoc, "Common"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(mouthSpriteLoc, "Common"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(bodySpriteLoc, "Common"), 0)); spriteHelper.Get(string.Format(pattern, string.Format(armSpriteLoc, "Common"), "l_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(armSpriteLoc, "Common"), "r_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(legSpriteLoc, "Common"), "l_" + 0)); spriteHelper.Get(string.Format(pattern, string.Format(legSpriteLoc, "Common"), "r_" + 0)); yield return(null); }