summaryrefslogtreecommitdiff
path: root/Assets/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts')
-rw-r--r--Assets/Scripts/Test 1/TestCamera.cs26
-rw-r--r--Assets/Scripts/Test 1/TestCamera.cs.meta11
2 files changed, 37 insertions, 0 deletions
diff --git a/Assets/Scripts/Test 1/TestCamera.cs b/Assets/Scripts/Test 1/TestCamera.cs
new file mode 100644
index 00000000..6a6795bd
--- /dev/null
+++ b/Assets/Scripts/Test 1/TestCamera.cs
@@ -0,0 +1,26 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class TestCamera : MonoBehaviour
+{
+
+ // Start is called before the first frame update
+ void Start()
+ {
+
+ }
+
+ // Update is called once per frame
+ void Update()
+ {
+ if(TestErika.Instance.erika.unitController == null)
+ {
+ return;
+ }
+ Vector3 pos = transform.position;
+ pos.x = TestErika.Instance.erika.unitController.GetComponent<UnitController>().center.x;
+ pos.y = TestErika.Instance.erika.unitController.GetComponent<UnitController>().center.y;
+ transform.position = pos;
+ }
+}
diff --git a/Assets/Scripts/Test 1/TestCamera.cs.meta b/Assets/Scripts/Test 1/TestCamera.cs.meta
new file mode 100644
index 00000000..82135dff
--- /dev/null
+++ b/Assets/Scripts/Test 1/TestCamera.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 43084247c2f8b3743845be21c5d86ab5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: