public void setWeaponTemplate(WeaponTemplate weaponTemplate) { weaponTemp = weaponTemplate; //item.itemPrefab.sprite; // Sprite myFruit = Resources.Load("fruits_1", typeof(Sprite)) as Sprite; if (weaponTemp.weaponMaestro != null) { sprite = UtilsItems.getSpriteWeapon(weaponTemp.weaponMaestro.sprite); GetComponent <Image>().sprite = sprite; } }
public void setWeaponTo(WeaponTemplate weap) { weaponTemplate = weap; weaponRightSprite = UtilsItems.getSpriteWeapon(weap.weaponMaestro.sprite); rightHandGO.GetComponent <SpriteRenderer>().sprite = weaponRightSprite; }