Refactored game loop to allow full local testing Added AI controller abstractions Added ability to save database to local copy for offline testing Tech Tab is now interactive, has properties panel
19 lines
499 B
C#
19 lines
499 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class ClickableCollider : MonoBehaviour
|
|
{
|
|
public event Action<ClickableCollider, PointerEventData> OnClick;
|
|
|
|
public void Click(PointerEventData eventData) => OnClick?.Invoke(this, eventData);
|
|
|
|
void Start()
|
|
{
|
|
var proto = GetComponent<Prototype>();
|
|
if(proto != null)
|
|
proto.OnReturnToPool += () => OnClick = null;
|
|
}
|
|
}
|