20 lines
399 B
C#
20 lines
399 B
C#
![]() |
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class Cam : MonoBehaviour
|
||
|
{
|
||
|
public Player player;
|
||
|
void Start()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
gameObject.transform.position = new Vector3(player.transform.position.x, gameObject.transform.position.y,gameObject.transform.position.z);
|
||
|
}
|
||
|
}
|