protected void InitLine(Transform parent) //Инициализируем линию { GameObject Line = ObjectPoolingManager.Instance.GetShinyLine(parent); activeLine = Line.GetComponent <ShinyLineScript>(); col = NormilizeColor(col); activeLine.col = col; Debug.Log("Color is set"); activeLine.center = center; activeLine.startLine = true; activeLine.Restart(); }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag("ShinyLine") /*&& !initializator*/) { //Debug.Log("Line collided!"); line = collision.GetComponent <ShinyLineScript>(); { if (line.startLine) { OnMouseEnterFunction(); if (!line.detectedNodes.Contains(gameObject)) { line.detectedNodes.Add(gameObject); } } } } }
private void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("ShinyLine")) { if (!activate) { line = other.GetComponent <ShinyLineScript>(); if (!activate && line.startLine) { OnMouseEnterFunction(); if (!line.detectedNodes.Contains(gameObject)) { line.detectedNodes.Add(gameObject); } line.activateAnswer = true; line.targetNode = null; } } } }
public LineData(ShinyLineScript shinyLineScript, int Parent, int Target) { line = shinyLineScript; parent = Parent; target = Target; }