forked from team-sg/hero-mark-2
made it so roboturret can be flipped in editor
This commit is contained in:
parent
319eec7f5b
commit
6a180c4f0c
2 changed files with 3 additions and 6 deletions
|
@ -24,11 +24,8 @@ func _physics_process(delta):
|
|||
|
||||
func spawn_bullet():
|
||||
var arrow = ArrowProjectile.instance()
|
||||
if scale.x > 0:
|
||||
arrow.global_position = global_position + shootpos.position
|
||||
else:
|
||||
arrow.global_position = global_position + shootpos.position
|
||||
arrow.direction = sign(shootpos.position.x)
|
||||
arrow.global_position = global_position + (shootpos.position * scale)
|
||||
arrow.direction = sign(shootpos.position.x) * scale.x
|
||||
arrow.target_group = "player"
|
||||
arrow.speed = arrow_speed
|
||||
Game.get_map().add_child(arrow)
|
||||
|
|
|
@ -155,7 +155,7 @@ autostart = true
|
|||
[node name="RayCast2D" type="RayCast2D" parent="."]
|
||||
position = Vector2( 3, 3 )
|
||||
enabled = true
|
||||
cast_to = Vector2( 45, 0 )
|
||||
cast_to = Vector2( 48, 0 )
|
||||
collision_mask = 8
|
||||
collide_with_areas = true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue