20 lines
476 B
C#
20 lines
476 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class GiftBox : Interactable
|
|
{
|
|
[SerializeField]
|
|
GameObject collectableToSpawn;
|
|
|
|
[SerializeField]
|
|
AudioClip GiftBoxAudio;
|
|
|
|
public override void Interact()
|
|
{
|
|
AudioSource.PlayClipAtPoint(GiftBoxAudio, transform.position, 1f);
|
|
|
|
Instantiate(collectableToSpawn, transform.position, collectableToSpawn.transform.rotation);
|
|
base.Interact();
|
|
}
|
|
}
|