예제 #1
0
    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;
        }
    }
예제 #2
0
 public void setWeaponTo(WeaponTemplate weap)
 {
     weaponTemplate    = weap;
     weaponRightSprite = UtilsItems.getSpriteWeapon(weap.weaponMaestro.sprite);
     rightHandGO.GetComponent <SpriteRenderer>().sprite = weaponRightSprite;
 }