minor improvement
This commit is contained in:
@@ -23,7 +23,7 @@ func _ready():
|
|||||||
collision_shape_2d.shape = coll
|
collision_shape_2d.shape = coll
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
if abs(position.x - player.position.x) < 220 or is_down:
|
if abs(position.x - player.position.x) < 225 or is_down:
|
||||||
linear_velocity.x = speed
|
linear_velocity.x = speed
|
||||||
|
|
||||||
if ray_cast_left_2 == null:
|
if ray_cast_left_2 == null:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ var innocent = false
|
|||||||
@onready var player = %player
|
@onready var player = %player
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
if abs(position.x - player.position.x) < 220:
|
if abs(position.x - player.position.x) < 225:
|
||||||
linear_velocity.x = speed
|
linear_velocity.x = speed
|
||||||
|
|
||||||
if ray_cast_left_2 == null:
|
if ray_cast_left_2 == null:
|
||||||
|
|||||||
Reference in New Issue
Block a user