using System.Collections; using System.Collections.Generic; using UnityEngine; using UltraCombos.Configuration; public class CameraController : MonoBehaviour { [Config] [Range(-5f, 5f)] public float cam_x; [Config] [Range(5f, 10f)] public float cam_y = 8f; [Config] [Range(0.05f, 0.5f)] public float key_movement = 0.1f; // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.A)) { cam_x -= key_movement; } else if (Input.GetKeyDown(KeyCode.D)) { cam_x += key_movement; } else if (Input.GetKeyDown(KeyCode.W)) { cam_y += key_movement; } else if (Input.GetKeyDown(KeyCode.S)) { cam_y -= key_movement; } GetComponent().position = new Vector3(cam_x, cam_y, 0); } }