2025-04-07 21:57:07 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class CameraController : MonoBehaviour
|
|
|
|
|
{
|
2025-05-26 22:02:52 +08:00
|
|
|
|
/* [SerializeField] private Transform target;
|
2025-04-07 21:57:07 +08:00
|
|
|
|
|
|
|
|
|
[SerializeField] private Vector2 minMaxXY;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
if(target == null)
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("û<>ҵ<EFBFBD><D2B5><EFBFBD>ɫλ<C9AB><CEBB>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void LateUpdate()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
transform.position = new Vector3(Mathf.Clamp(target.position.x,-minMaxXY.x,minMaxXY.x) , Mathf.Clamp(target.position.y, -minMaxXY.y, minMaxXY.y), -10);
|
2025-05-26 22:02:52 +08:00
|
|
|
|
}*/
|
2025-04-07 21:57:07 +08:00
|
|
|
|
}
|