示例#1
0
    public override void TowerUpdate()
    {
        points = TargetPoint.AllTargets(transform.position, 100f);
        int k = 0;

        foreach (var x in points)
        {
            TargetPoint temp = x;
            if (TrackTarget(ref temp) || AcquireTarget(out temp))
            {
                if (IsFiring)
                {
                    Shoot(k, temp);
                    k++;
                }
                else
                {
                    lines[k].enabled = false;
                }
            }
            else
            {
                lines[k].enabled = false;
            }
        }
    }