void Start() { RotationController.CalibratedRotation().Add(this); scoreTextObject.transform.position = new Vector3(0, lvlGenerationTunnelHeight, 10); lvlGenerationGameObjects = new List <GameObject>(); lvlGenerationCurrent = -lvlGenerationBackwards; transform.position = new Vector3(0.0f, 2.0f, 0.0f); transform.eulerAngles = Vector3.up; score = 0; UpdateScoreDisplay(); Mesh mesh = new Mesh(); { mesh.vertices = new Vector3[] { new Vector3(-lvlGenerationTunnelWidth, 0, 0), new Vector3(-lvlGenerationTunnelWidth, 0, lvlGenerationMeshDistance), new Vector3(lvlGenerationTunnelWidth, 0, lvlGenerationMeshDistance), new Vector3(lvlGenerationTunnelWidth, 0, 0) }; mesh.triangles = new int[] { 0, 1, 2, 0, 2, 3 }; mesh.RecalculateNormals(); mesh.RecalculateBounds(); mesh.Optimize(); } lvlGenerationTestMesh = mesh; }
void Start() { RotationController.CalibratedRotation().Add(this); }