Files
FueraDeEscala/Assets/Game Kit Controller/Integrations/LimbHacker-master/Example/RestartButton.cs

29 lines
426 B
C#
Raw Normal View History

2026-03-29 23:03:14 -07:00
using UnityEngine;
using System.Collections;
namespace NobleMuffins.LimbHacker.Examples
{
[RequireComponent(typeof(Button))]
public class RestartButton : MonoBehaviour
{
public Spawner spawner;
private Button button;
void Start()
{
button = gameObject.GetComponent<Button>();
}
void Update()
{
button.visible = spawner.CanInstantiate;
}
void OnClick()
{
spawner.Instantiate();
}
}
}