Local AI Testing & Interactive Tech Tab

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
This commit is contained in:
hyperion51 2020-04-23 03:31:17 +01:00
commit af88788e4f
50 changed files with 5799 additions and 712 deletions

View file

@ -1,9 +1,11 @@
using System.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ClickRaycaster : MonoBehaviour
{
public event Action OnClickMiss;
public Camera RayCamera;
private ClickCatcher _clickCatcher;
@ -19,6 +21,7 @@ public class ClickRaycaster : MonoBehaviour
var clickable = hit.collider.GetComponent<ClickableCollider>();
if (clickable != null)
clickable.Click(pointer);
else OnClickMiss?.Invoke();
}
};
}

View file

@ -9,4 +9,11 @@ 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;
}
}

View file

@ -0,0 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class ZoneShip : MonoBehaviour
{
public MeshRenderer Icon;
public TextMeshPro Label;
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 43af4df5b5df0424c8b211ebd29af165
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: