fixed bug where arrows wouldnt spawn when player was on a different y sector
This commit is contained in:
parent
01d2662734
commit
8e08495b03
2 changed files with 5 additions and 2 deletions
|
@ -42,7 +42,10 @@ tile_data = PoolIntArray( 786454, 0, 65537, 786455, 0, 65537, 851990, 0, 65537,
|
||||||
position = Vector2( 120, 120 )
|
position = Vector2( 120, 120 )
|
||||||
|
|
||||||
[node name="Slime" parent="." instance=ExtResource( 10 )]
|
[node name="Slime" parent="." instance=ExtResource( 10 )]
|
||||||
position = Vector2( 84, -7 )
|
position = Vector2( 264, 168 )
|
||||||
|
|
||||||
|
[node name="Slime2" parent="." instance=ExtResource( 10 )]
|
||||||
|
position = Vector2( 264, 160 )
|
||||||
|
|
||||||
[node name="Arrow" parent="." instance=ExtResource( 13 )]
|
[node name="Arrow" parent="." instance=ExtResource( 13 )]
|
||||||
position = Vector2( 184, 163 )
|
position = Vector2( 184, 163 )
|
||||||
|
|
|
@ -10,7 +10,7 @@ var direction = 1.0
|
||||||
#Edge to check culling, if this edge is offscreen, delete the arrow
|
#Edge to check culling, if this edge is offscreen, delete the arrow
|
||||||
onready var cull_edge = Vector2(5 * direction,0)
|
onready var cull_edge = Vector2(5 * direction,0)
|
||||||
onready var player = get_parent().get_node("Player")
|
onready var player = get_parent().get_node("Player")
|
||||||
onready var initial_sector = Game.get_sector(player.global_position)
|
onready var initial_sector = Game.current_sector
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
#Flip depending on direction
|
#Flip depending on direction
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue