27 lines
523 B
C#
27 lines
523 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
|
|
public class Mine : MonoBehaviour
|
|
{
|
|
public Resource resource;
|
|
private GameManager gameManager;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
gameManager = GameObject.Find("GameManager").GetComponent<GameManager>();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
private void OnMouseDown()
|
|
{
|
|
gameManager.AddResource(resource, 1);
|
|
}
|
|
}
|