Esempio n. 1
0
 public void ChangeColor(Color color)
 {
     this.color = color;
     if (actTailPart != null)
     {
         LineRenderer lr = actTailPart.GetComponent <LineRenderer>();
         lr.startColor = color;
         lr.endColor   = color;
     }
 }
Esempio n. 2
0
    private void NewTailPart(Vector3 actPosition)
    {
        if (actTailPart != null)
        {
            actTailPart.End(actPosition);
        }
        actTailPart      = Instantiate(tailPartPrefab, transform).GetComponent <TailPart>();
        actTailPart.tail = this;

        LineRenderer lr = actTailPart.GetComponent <LineRenderer>();

        lr.startColor = color;
        lr.endColor   = color;

        actTailPart.SetThickness(size);
        tailParts.Add(actTailPart);
    }