]> git.cameronkatri.com Git - gmtk-gamejam.git/commitdiff
Add AI Guy
authorCameron Katri <me@cameronkatri.com>
Sat, 12 Jun 2021 02:12:35 +0000 (22:12 -0400)
committerCameron Katri <me@cameronkatri.com>
Sat, 12 Jun 2021 02:12:35 +0000 (22:12 -0400)
Assets/Scripts/AIController.cs [new file with mode: 0644]
Assets/Scripts/AIController.cs.meta [new file with mode: 0644]

diff --git a/Assets/Scripts/AIController.cs b/Assets/Scripts/AIController.cs
new file mode 100644 (file)
index 0000000..9cb20fb
--- /dev/null
@@ -0,0 +1,16 @@
+using UnityEngine;
+
+public class AIController : MonoBehaviour
+{
+       private void Update()
+       {
+               if (Input.GetKey(KeyCode.H))
+               {
+                       transform.position += Vector3.right * 0.01f;
+               }
+               else if (Input.GetKey(KeyCode.F))
+               {
+                       transform.position += Vector3.left * 0.01f;
+               }
+       }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/AIController.cs.meta b/Assets/Scripts/AIController.cs.meta
new file mode 100644 (file)
index 0000000..a64fd78
--- /dev/null
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: bc5bf022ed0c4bfcaae099b96eecf645
+timeCreated: 1623461478
\ No newline at end of file