Attempt to refactor components.
This commit is contained in:
parent
e3fb082139
commit
79122a074e
15 changed files with 241 additions and 112 deletions
|
|
@ -101,7 +101,7 @@ func shoot():
|
|||
# Instantiate the bullets
|
||||
var bullet = weapon_current.instantiate()
|
||||
get_tree().root.add_child(bullet)
|
||||
prints(bullet_resource.speed,bullet_resource.projectiles, bullet_resource.projectile_spacing)
|
||||
#prints(bullet.speed,bullet.projectiles, bullet.projectile_spacing)
|
||||
bullet.position = position + Vector2((b - (projectiles- 1) / 2.0) * PROJECTILE_SPACING /2, MUZZLE_HEIGHT)
|
||||
|
||||
# Get weapon speed and spacing for equidistant calculations
|
||||
|
|
@ -110,6 +110,6 @@ func shoot():
|
|||
#bullet_speed = bullet_resource.speed
|
||||
|
||||
# Print which weapon is firing
|
||||
prints(bullet.shot_data.shot_name, "weapon fired")
|
||||
#prints(bullet.shot_data.shot_name, "weapon fired")
|
||||
#travel -= weapon_spacing
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue