rabidus-test/Assets/Scripts/BaseItem.cs

14 lines
261 B
C#
Raw Normal View History

2023-08-15 17:38:54 +03:00
using UnityEngine;
public class BaseItem : MonoBehaviour, IInteractable
{
[SerializeField]
private float _scoreAdd = 0;
public virtual void Interact()
{
PlayerSetup.Instance.AddScore(_scoreAdd);
Destroy(gameObject);
}
}