summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Test 1/TestCamera.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Test 1/TestCamera.cs')
-rw-r--r--Assets/Scripts/Test 1/TestCamera.cs26
1 files changed, 26 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;
+ }
+}