怪物搞完

This commit is contained in:
2025-07-19 01:21:40 +08:00
parent 95aec74d37
commit a84a4e56b6
7 changed files with 100 additions and 452 deletions

View File

@@ -45,4 +45,12 @@ public partial class MapManager : MonoBehaviour
mapRealWidth = x;
mapRealHeight = y;
}
public void MoveToCamera(float x, float y)
{
Vector3 newPosition;
newPosition.x = Mathf.Clamp(x, 0, mapRealWidth);
newPosition.y = Mathf.Clamp(y, 0, mapRealHeight);
Camera.main.transform.position = new Vector3(x, y, -10);
}
}