i3e-asg2/Assets/Scripts/Generator.cs
2024-07-05 01:22:55 +08:00

17 lines
453 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class Generator : Interactable
{
public AudioClip Source;
public override void Interact()
{
GameManager.instance.gotGenerator = true;
GameObject.Find("GeneratorObjective").GetComponent<TextMeshProUGUI>().color = Color.green;
AudioSource.PlayClipAtPoint(Source,transform.position,1f);
base.Interact();
}
}