using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using RPGCreationKit; using RPGCreationKit.Player; namespace RPGCreationKit { /// /// Class used by buttons when the player is interacting with an InteractiveObject /// public class InteractiveObjectUI : MonoBehaviour { // References and ID [HideInInspector] public int id = -1; [HideInInspector] public InteractiveObject_Behaviour Object_Behaviour; [HideInInspector] public InteractiveOptions option; public Text text; /// /// Called when the Button is instantiated /// /// The obj behaviour /// The ScriptableObject reference /// The current option public void Init(InteractiveObject_Behaviour obj_behaviour, InteractiveObject obj, InteractiveOptions _option) { // Set all values Object_Behaviour = obj_behaviour; option = _option; text.text = option.ToString(); // Add listener to perform actions gameObject.GetComponent