private void Awake() { Instance = this; lineRenderer.startWidth = 0; lineRenderer.endWidth = 0; currentSphereGameAreaRadius = sphereGameAreaRadiusMinMax.y; meshIsSphere = false; meshIsShrink = false; sphereAreaEdges.localPosition = new Vector3(sphereGameAreaCenter.x, sphereGameAreaCenter.y, 0.8f); for (int i = 0; i < trailTrans.Length; i++) { trailTrans[i] = sphereAreaEdges.GetChild(i); trailRenders[i] = trailTrans[i].GetComponent <TrailRenderer>(); } foreach (var trailRender in trailRenders) { trailRender.emitting = false; } trailTrans[0].localPosition = new Vector3(0, sphereGameAreaRadiusMinMax.y, 0); trailTrans[1].localPosition = new Vector3(0, -sphereGameAreaRadiusMinMax.y, 0); trailTrans[2].localPosition = new Vector3(sphereGameAreaRadiusMinMax.y, 0, 0); trailTrans[3].localPosition = new Vector3(-sphereGameAreaRadiusMinMax.y, 0, 0); }
private void OnEnable() { PlayableArea = FindObjectOfType <PlayableArea>(); }