using SHADE; using System; using System.Collections.Generic; using System.Linq; public class PreviewLevel : Script { public GameObject previewLevelPoints; private List listOfpreviewLevelPoints; private Transform tran; public Vector3 endPoint1; public Vector3 endPoint2; public Vector3 endPoint3; public float duration = 3.0f; private bool point1Done; private bool point2Done; private bool point3Done; protected override void awake() { //GetComponent().SetMainCamera(); if (previewLevelPoints) listOfpreviewLevelPoints = previewLevelPoints.GetComponentsInChildren().ToList(); else Debug.LogError("MISSING PREVIEW POINTS"); if(listOfpreviewLevelPoints.Count == 0) Debug.LogError("EMPTY PREVIEW POINTS"); tran = GetComponent(); if (!tran) Debug.LogError("MISSING PREVIEW TRANSFORM"); else tran.LocalPosition = listOfpreviewLevelPoints[0].LocalPosition; } protected override void update() { } }