using System.Collections; using System.Collections.Generic; using UnityEngine; using Cinemachine; public class CameraController : Singleton { //Set up Cinemachine Camera system for the game private CinemachineVirtualCamera cinemachineVirtualCamera; /// /// This method starts the game and references /// the method that set the camera to follow the /// player right from the start. /// private void Start(){ SetPlayerCameraFollow(); } /// /// This method finds the player object and sets /// the camera to follow the player. /// public void SetPlayerCameraFollow(){ cinemachineVirtualCamera = FindObjectOfType(); cinemachineVirtualCamera.Follow = PlayerController.Instance.transform; } }