can bullets have puppet strings?
This commit is contained in:
parent
5f732e1e6f
commit
6809a3733a
9 changed files with 55 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
|||
extends Node2D
|
||||
|
||||
@export var Bullet: PackedScene
|
||||
@export var bullet_scene: PackedScene
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
|
|
@ -14,10 +14,10 @@ func _input(event: InputEvent) -> void:
|
|||
func _on_timer_timeout() -> void:
|
||||
$AudioStreamPlayer.play()
|
||||
print("yeth")
|
||||
var bullet = Bullet.instantiate()
|
||||
var bullet = bullet_scene.instantiate()
|
||||
get_owner().get_owner().add_child(bullet)
|
||||
bullet.global_position = $Marker2D.global_position
|
||||
|
||||
var bullet2 = Bullet.instantiate()
|
||||
var bullet2 = bullet_scene.instantiate()
|
||||
get_owner().get_owner().add_child(bullet2)
|
||||
bullet2.global_position = $Marker2D2.global_position
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
[node name="PlayerBulletEmitter" type="Node2D"]
|
||||
script = ExtResource("1_51eej")
|
||||
Bullet = ExtResource("2_xytg0")
|
||||
bullet_scene = ExtResource("2_xytg0")
|
||||
|
||||
[node name="Marker2D" type="Marker2D" parent="."]
|
||||
position = Vector2(-7, -5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue