37 lines
804 B
C#
37 lines
804 B
C#
using Invector.vItemManager;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class PanelWeaponImageSetter : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Image image;
|
|
|
|
[SerializeField]
|
|
private Sprite defaultSprite;
|
|
|
|
private Color transparentColor = new Color(1, 1, 1, 0.5f);
|
|
private Color fullyVisibleColor = new Color(1, 1, 1);
|
|
|
|
public void SetPanelToWeaponImage(vItem item)
|
|
{
|
|
image.sprite = item.icon;
|
|
}
|
|
|
|
public void SetPanelToDefaultImage(vItem removedItem)
|
|
{
|
|
image.sprite = defaultSprite;
|
|
}
|
|
|
|
public void MakeButtonTransparent()
|
|
{
|
|
image.color = transparentColor;
|
|
}
|
|
|
|
public void MakeButtonFullyVisible()
|
|
{
|
|
image.color = fullyVisibleColor;
|
|
}
|
|
} |