Example #1
0
    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();
    }
Example #2
0
 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);
                 }
             }
         }
     }
 }
Example #3
0
 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;
             }
         }
     }
 }
Example #4
0
 public LineData(ShinyLineScript shinyLineScript, int Parent, int Target)
 {
     line   = shinyLineScript;
     parent = Parent;
     target = Target;
 }