15 lines
316 B
C#
15 lines
316 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class CollectionsModule : MonoBehaviour
|
||
|
{
|
||
|
public void OnTriggerCollectItem(Collider other)
|
||
|
{
|
||
|
if (other.TryGetComponent(out ICollectable collectable))
|
||
|
{
|
||
|
collectable.Collect();
|
||
|
}
|
||
|
}
|
||
|
}
|