18 lines
380 B
C#
18 lines
380 B
C#
using UnityEngine;
|
|
|
|
public class CameraController : MonoBehaviour
|
|
{
|
|
public GameObject player;
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
transform.position = new Vector3(player.transform.position.x,
|
|
player.transform.position.y,
|
|
player.transform.position.z);
|
|
}
|
|
}
|