spittin fiend
This commit is contained in:
parent
6825cd59c9
commit
dd66cc2a84
6 changed files with 65 additions and 4 deletions
|
|
@ -6,10 +6,10 @@ extends Node2D
|
|||
@export var projectile = preload("res://objects/projectile/enemy_projectile.tscn")
|
||||
@export var move_speed = 0.0
|
||||
|
||||
func shoot():
|
||||
func shoot(pos):
|
||||
var Projectile = projectile.instantiate()
|
||||
Projectile.speed.x = shoot_speed.x + randf_range(-shoot_variance.x,shoot_variance.x)
|
||||
Projectile.speed.y = shoot_speed.y + randf_range(-shoot_variance.y,shoot_variance.y)
|
||||
Projectile.position = %Marker2D.global_position
|
||||
Projectile.position = pos
|
||||
get_parent().add_child(Projectile)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue