diff options
author | Malfurious <m@lfurio.us> | 2022-10-30 01:59:06 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2022-10-30 01:59:06 -0400 |
commit | 57eaeff00597f8ae6289b935dec0c408e21759ab (patch) | |
tree | 37d052e275b1937a760350339be465f19cc4acf3 /assets/weapons/goo_gun/GooGun.gd | |
parent | acaea7bf1657f02670c2551357be178b0bf16f75 (diff) | |
download | project-s-57eaeff00597f8ae6289b935dec0c408e21759ab.tar.gz project-s-57eaeff00597f8ae6289b935dec0c408e21759ab.zip |
Convert script tabs to spaces
and other whitespace fixes!
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'assets/weapons/goo_gun/GooGun.gd')
-rw-r--r-- | assets/weapons/goo_gun/GooGun.gd | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/assets/weapons/goo_gun/GooGun.gd b/assets/weapons/goo_gun/GooGun.gd index 6cb87fc..8ee6e0f 100644 --- a/assets/weapons/goo_gun/GooGun.gd +++ b/assets/weapons/goo_gun/GooGun.gd @@ -13,19 +13,19 @@ var time_since_fire = 0 var Bullet = preload("res://assets/weapons/goo_gun/Bullet.tscn") func _physics_process(delta): - if is_firing: - time_since_fire += delta - if time_since_fire >= fire_rate: - time_since_fire -= fire_rate - do_fire_projectile() - else: - time_since_fire = fire_rate + if is_firing: + time_since_fire += delta + if time_since_fire >= fire_rate: + time_since_fire -= fire_rate + do_fire_projectile() + else: + time_since_fire = fire_rate func do_fire_projectile(): - var bullet = Bullet.instance() - bullet.material = projectile_material - $Nozzle.add_child(bullet) - bullet.set_as_toplevel(true) - var shoot_direction = Vector3.FORWARD.rotated(Vector3.LEFT, weapon_pitch) - shoot_direction = shoot_direction.rotated(Vector3.UP, look_angle) - bullet.apply_central_impulse(shoot_direction.normalized() * projectile_scalar) + var bullet = Bullet.instance() + bullet.material = projectile_material + $Nozzle.add_child(bullet) + bullet.set_as_toplevel(true) + var shoot_direction = Vector3.FORWARD.rotated(Vector3.LEFT, weapon_pitch) + shoot_direction = shoot_direction.rotated(Vector3.UP, look_angle) + bullet.apply_central_impulse(shoot_direction.normalized() * projectile_scalar) |