45 lines
816 B
C#
45 lines
816 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class InteractionCanvasInfoPanel : MonoBehaviour
|
|
{
|
|
public enum Type
|
|
{
|
|
PickUpRod = 0,
|
|
DropRodOnStojak = 1
|
|
}
|
|
|
|
public Image interactionImage;
|
|
|
|
public Text informationText;
|
|
|
|
public Text informationObjectNameText;
|
|
|
|
public Sprite[] interactionSprites;
|
|
|
|
public void SetInfoPanel(Type _type, Transform _object)
|
|
{
|
|
switch (_type)
|
|
{
|
|
case Type.PickUpRod:
|
|
informationText.text = "[E]";
|
|
informationObjectNameText.text = _object.name;
|
|
interactionImage.sprite = interactionSprites[(int)_type];
|
|
break;
|
|
case Type.DropRodOnStojak:
|
|
informationText.text = "[E]";
|
|
informationObjectNameText.text = _object.name;
|
|
interactionImage.sprite = interactionSprites[(int)_type];
|
|
break;
|
|
}
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
}
|
|
}
|