mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-28 19:14:23 +00:00
SkitterFromMouse
: it turns out randi_range
is inclusive
This commit is contained in:
parent
edf61001af
commit
ff3c0d97d3
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ func _physics_process(delta: float) -> void:
|
||||||
match state:
|
match state:
|
||||||
State.SCARED:
|
State.SCARED:
|
||||||
if len(directions) > 0:
|
if len(directions) > 0:
|
||||||
var idx := Random.rng.randi_range(0, len(directions))
|
var idx := Random.rng.randi_range(0, len(directions) - 1)
|
||||||
var direction: Vector2 = directions[idx]
|
var direction: Vector2 = directions[idx]
|
||||||
var movement: Vector2 = direction * delta * speed
|
var movement: Vector2 = direction * delta * speed
|
||||||
move.emit(movement)
|
move.emit(movement)
|
||||||
|
|
Loading…
Reference in a new issue