summaryrefslogtreecommitdiffstats
path: root/assets/weapons/goo_gun/GooGun.gd
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2022-09-12 01:57:57 -0400
committerMalfurious <m@lfurio.us>2022-09-12 01:57:57 -0400
commitf44398ea774c171d9aa0f274f603101c7a1186b9 (patch)
tree4d585c65bda38f643d4a4924ea6757c478509936 /assets/weapons/goo_gun/GooGun.gd
parent85cf10772c6bc1390e9dfb07dddd6e204b856340 (diff)
downloadproject-s-f44398ea774c171d9aa0f274f603101c7a1186b9.tar.gz
project-s-f44398ea774c171d9aa0f274f603101c7a1186b9.zip
Allow dynamic character material
This will enable selection between the friendly (default) and enemy material to apply to any given player model for prototyping purposes. Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to '')
-rw-r--r--assets/weapons/goo_gun/GooGun.gd2
1 files changed, 2 insertions, 0 deletions
diff --git a/assets/weapons/goo_gun/GooGun.gd b/assets/weapons/goo_gun/GooGun.gd
index 6a6758d..6cb87fc 100644
--- a/assets/weapons/goo_gun/GooGun.gd
+++ b/assets/weapons/goo_gun/GooGun.gd
@@ -2,6 +2,7 @@ extends Spatial
export var is_firing = false
export var fire_rate = 0.075
+export var projectile_material : Material = null
export var projectile_spread = 0 #TODO
export var projectile_scalar = 40
export var look_angle = 0
@@ -22,6 +23,7 @@ func _physics_process(delta):
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)