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:
parent
43d5ebdd35
commit
af88788e4f
50 changed files with 5799 additions and 712 deletions
|
|
@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
11
Assets/Scripts/UI/ZoneShip.cs
Normal file
11
Assets/Scripts/UI/ZoneShip.cs
Normal 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;
|
||||
}
|
||||
11
Assets/Scripts/UI/ZoneShip.cs.meta
Normal file
11
Assets/Scripts/UI/ZoneShip.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 43af4df5b5df0424c8b211ebd29af165
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in a new issue