Пример #1
0
 public void Init()
 {
     Placed.Add(new Point {
         Value = ((float3)Origin.position).xy
     });
     lastPlacedTemp = LastPlaced;
     LastPointUpdated?.Invoke(lastPlacedTemp);
 }
Пример #2
0
    private void FixedUpdate()
    {
        UpdatePointsInAir();

        CheckWrapForInAir();

        // WrapWireAroundObstacles(LastPlaced.Value, Current.Value, Placed.Count);

        if (WrapAroundCorners)
        {
            TargetToLastRaycastCheck();
        }

        if (lastPlacedTemp != LastPlaced)
        {
            lastPlacedTemp = LastPlaced;
            LastPointUpdated?.Invoke(lastPlacedTemp);
        }

        if (WentAboveMaxLength)
        {
            ReachedMaxLength?.Invoke();
        }
    }