예제 #1
0
 public void SetItem(_ShopItem _item, int i)
 {
     index = i;
     item  = _item;
     //Cambio el texto y las imagenes
     icon.sprite   = item.Image;
     txtPrice.text = item.price.ToString();
     //Poner un if aca por si es comprar o equipar
     UpdateButtonUi();
 }
예제 #2
0
    /// <summary>
    /// Cambia las sprites correspondientes al ui del momento
    /// </summary>
    /// <param name="shopItem"></param>
    void SetEquipedHUD(_ShopItem shopItem)
    {
        leftArrowSprite.sprite  = shopItem.ArrowLeft;
        rightArrowSprite.sprite = shopItem.ArrowRight;

        jumpSprite.sprite = shopItem.JumpButton;
        if (switchImage != null && switchImage.gameObject.activeSelf == true)
        {
            switchImage.Move     = shopItem.SwitchMove;
            switchImage.Teleport = shopItem.SwitchTeleport;
            switchImage.UpdateSprites();
        }
    }