Spaces:
Running
Running
File size: 709 Bytes
c80142e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
using UnityEngine;
public class CrabInteract : InteractHandler
{
public GameObject commandUIPrefab;
public LogManager logman;
private GameObject currentUI;
void Start()
{
logman = FindObjectOfType<LogManager>();
}
public override void InteractLogic()
{
if (currentUI == null)
{
currentUI = Instantiate(commandUIPrefab);
currentUI.GetComponent<CrabInterface>().crab = GetComponent<CrabHandler>();
logman.SetCrabInterface(commandUIPrefab.GetComponent<CrabInterface>());
}
logman.ToggleLogMenu(true);
base.InteractLogic();
interactable = true;
}
}
|