private void Awake()
 {
     playerCircleEntity = GetComponent <IPlayerCircleEntity>();
     playerPathFollower = GetComponent <IPlayerPathFollower>();
     lineRenderer       = GetComponent <LineRenderer>();
     playerPathFollower.OnPlayerPathUpdate += OnPlayerPathUpdate;
 }
Esempio n. 2
0
        private void Awake()
        {
            playerPathFollower = GetComponent <IPlayerPathFollower>();
            pathEntity         = FindObjectsOfType <MonoBehaviour>().OfType <IPathEntity>().FirstOrDefault();
            mainCamera         = Camera.main;
            virtualPlane.SetNormalAndPosition(Vector3.forward, new Vector3(0f, 0f, 0f));
            var screenAspect = (float)Screen.width / (float)Screen.height;
            var cameraHeight = mainCamera.orthographicSize * 2;

            cameraBounds = new Bounds(new Vector3(0f, 0f, 0f), new Vector3(cameraHeight * screenAspect - 1f, cameraHeight - 1f, 0f));
        }