summaryrefslogtreecommitdiff
path: root/Assets/Scripts
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-09-11 19:50:15 +0800
committerchai <chaifix@163.com>2021-09-11 19:50:15 +0800
commita9d460f503f4d09a4c0e00164c6ca1ba3f8725dd (patch)
tree72d06846b7425e6e4ee9ce59db4b767856fcb531 /Assets/Scripts
parentb40a0e5c925b4c2c0cbef21c6e28fd83cf2e246b (diff)
*misc
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: