Signed-off-by: magn9775 <magnusd2005@gmail.com>
This commit is contained in:
@@ -17,14 +17,12 @@ public class CameraControl :MonoBehaviour
|
||||
|
||||
int ActivePresetIndex = 0;
|
||||
CameraPreset ActivePreset;
|
||||
|
||||
public GameObject Loader;
|
||||
public GameObject TargetCar;
|
||||
GameController GameController { get { return GameController.Instance; } }
|
||||
|
||||
float SqrMinDistance;
|
||||
|
||||
|
||||
|
||||
Vector3 TargetPoint
|
||||
{
|
||||
get
|
||||
@@ -41,10 +39,19 @@ public class CameraControl :MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void getCar(GameObject car)
|
||||
{
|
||||
TargetCar = car;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Awake() {
|
||||
CamerasPreset.ForEach (c => c.CameraHolder.SetActive(false));
|
||||
UpdateActiveCamera ();
|
||||
|
||||
//TargetCar = Loader.GetComponent<CarLoader>().targetcar;
|
||||
|
||||
if (NextCameraButton)
|
||||
{
|
||||
NextCameraButton.onClick.AddListener (SetNextCamera);
|
||||
@@ -67,8 +74,12 @@ public class CameraControl :MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private IEnumerator Start ()
|
||||
{
|
||||
// TargetCar = Loader.GetComponent<CarLoader>().targetcar;
|
||||
|
||||
while (GameController == null)
|
||||
{
|
||||
yield return null;
|
||||
|
||||
Reference in New Issue
Block a user