private void Reset() { line = GetComponent <LineRenderer>(); if (line == null) { line = gameObject.AddComponent <LineRenderer>(); } Thrower = GetComponent <IThrower>(); SetLineRenderer(); }
private void Start() { SetLineRenderer(); if (HitPoint && HitPoint.IsPrefab()) { HitPoint = Instantiate(HitPoint, transform); } if (line.sharedMaterial == null) { line.material = new Material(Shader.Find("Sprites/Default")); } Thrower = GetComponent <IThrower>(); if (Thrower != null) { Thrower.Predict += DisplayTraj; } }