Newer
Older
HardPoint-Project-Abertay-University-Unity3D / Assets / Scripts / Systems / Currency / CurrencyEntity.cs
@Rackday Rackday on 18 Aug 532 bytes Project Added
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CurrencyEntity : MonoBehaviour
{
    private CurrencyController currencyController;
    [Tooltip("Minimum value X, Max Value Y")]
    [SerializeField] private Vector2 value;
    private void Start()
    {
        currencyController = GameObject.Find("CurrencyController").GetComponent<CurrencyController>();
    }
    public void AddCurrency()
    {
        currencyController.AddCurrency(Random.Range((int)value.x,(int)value.y));
    }
}