blink moves forward a short number of meters, not along waypoint boundaries
This commit is contained in:
parent
dc9184075b
commit
f4a0dc57c3
3 changed files with 52 additions and 22 deletions
|
|
@ -27,10 +27,9 @@ namespace TD.Gameplay.EnemyAbilities
|
|||
[Min(0.1f)]
|
||||
public float IntervalSeconds = 4f;
|
||||
|
||||
[Tooltip("How many path waypoints to skip per blink. Note that path smoothing can make " +
|
||||
"one waypoint span several tiles, so this is a coarser dial than it looks.")]
|
||||
[Min(1)]
|
||||
public int BlinkWaypoints = 2;
|
||||
[Tooltip("World units to advance along the path per blink.")]
|
||||
[Min(0.1f)]
|
||||
public float BlinkDistanceMeters = 4f;
|
||||
|
||||
[Tooltip("Random spread (seconds) added to each enemy's first blink so a wave doesn't " +
|
||||
"blink in one synchronized block. Applied once, at spawn.")]
|
||||
|
|
@ -54,7 +53,7 @@ namespace TD.Gameplay.EnemyAbilities
|
|||
if (timer < IntervalSeconds) return;
|
||||
|
||||
timer = 0f;
|
||||
instance.GetComponent<EnemyMovement>()?.ServerBlinkForward(BlinkWaypoints);
|
||||
instance.GetComponent<EnemyMovement>()?.ServerBlinkForward(BlinkDistanceMeters);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue