14 lines
283 B
C#
14 lines
283 B
C#
using UnityEngine;
|
|
|
|
public class BurriedItem : Diggable
|
|
{
|
|
public GameObject ItemToSpawn;
|
|
public Transform Spawnpoint;
|
|
|
|
public override void Dig()
|
|
{
|
|
Instantiate(ItemToSpawn, Spawnpoint.position, Spawnpoint.rotation, null);
|
|
Destroy(gameObject);
|
|
}
|
|
}
|