i3e-asg2/Assets/Scripts/Generator.cs

17 lines
453 B
C#
Raw Permalink Normal View History

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