mirror of
https://github.com/kristoferssolo/FuncIt.git
synced 2025-10-21 19:30:35 +00:00
deleting bot
when is shoot
This commit is contained in:
parent
10e37ac1c2
commit
d944bbf380
@ -30,5 +30,8 @@ func _process(delta):
|
||||
position += velocity * speed_hyper * delta
|
||||
|
||||
|
||||
func _on_hitbox_body_entered(_body):
|
||||
func _on_hitbox_body_entered(body):
|
||||
queue_free()
|
||||
|
||||
if body.is_in_group('bot'):
|
||||
body.queue_free()
|
||||
|
||||
@ -22,8 +22,9 @@ func _process(delta):
|
||||
position += velocity * speed_line * delta
|
||||
|
||||
|
||||
func _on_hitbox_body_entered(_body):
|
||||
func _on_hitbox_body_entered(body):
|
||||
queue_free()
|
||||
|
||||
|
||||
if body.is_in_group('bot'):
|
||||
body.queue_free()
|
||||
|
||||
|
||||
@ -29,5 +29,8 @@ func _process(delta):
|
||||
position += velocity * speed_parab * delta
|
||||
|
||||
|
||||
func _on_hitbox_body_entered(_body):
|
||||
func _on_hitbox_body_entered(body):
|
||||
queue_free()
|
||||
|
||||
if body.is_in_group('bot'):
|
||||
body.queue_free()
|
||||
|
||||
@ -23,3 +23,6 @@ func _on_hitbox_body_entered(body):
|
||||
if body.is_in_group("mobs"):
|
||||
body.queue_free()
|
||||
queue_free()
|
||||
|
||||
if body.is_in_group('bot'):
|
||||
body.queue_free()
|
||||
|
||||
@ -96,4 +96,4 @@ func shoot_bot():
|
||||
var b = bullet.instance()
|
||||
get_parent().add_child(b)
|
||||
b.global_position = self.global_position
|
||||
b.global_rotation = 360/rotationAmount
|
||||
b.global_rotation = self.global_rotation#360/rotationAmount
|
||||
|
||||
@ -7,15 +7,11 @@
|
||||
radius = 9.85811
|
||||
height = 35.0082
|
||||
|
||||
[node name="player_character_bullet" type="Sprite" groups=[
|
||||
"Net",
|
||||
]]
|
||||
[node name="player_character_bullet" type="Sprite" groups=["Net"]]
|
||||
texture = ExtResource( 1 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="hitbox" type="Area2D" parent="." groups=[
|
||||
"Player_damager",
|
||||
]]
|
||||
[node name="hitbox" type="Area2D" parent="." groups=["Player_damager"]]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="hitbox"]
|
||||
position = Vector2( 10.8253, -0.381073 )
|
||||
|
||||
@ -17,7 +17,6 @@ func follow_line_trajectory():
|
||||
|
||||
|
||||
func _process(delta):
|
||||
print(bot_rotation)
|
||||
follow_line_trajectory()
|
||||
time += delta
|
||||
position += velocity * speed_line * delta
|
||||
|
||||
Loading…
Reference in New Issue
Block a user