fx: sprite playing behaviour
This commit is contained in:
@@ -78,7 +78,6 @@ func get_new_flow():
|
||||
func calc_distance(one, two) -> float:
|
||||
var candidate = one.distance_to(two)
|
||||
var onedup = one
|
||||
# FIXME: doesnt work-- predators lose track across game boundary
|
||||
if one.x < screen_size.x/2:
|
||||
if one.y < screen_size.y/2:
|
||||
# top left
|
||||
@@ -103,7 +102,7 @@ func calc_distance(one, two) -> float:
|
||||
onedup.x += screen_size.x
|
||||
candidate = min(candidate, onedup.distance_to(two))
|
||||
else:
|
||||
# botom right
|
||||
# bottom right
|
||||
onedup.y += screen_size.y
|
||||
candidate = min(candidate, onedup.distance_to(two))
|
||||
onedup.y -= screen_size.y
|
||||
|
||||
Reference in New Issue
Block a user