diff options
author | Malfurious <m@lfurio.us> | 2022-09-12 01:57:57 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2022-09-12 01:57:57 -0400 |
commit | f44398ea774c171d9aa0f274f603101c7a1186b9 (patch) | |
tree | 4d585c65bda38f643d4a4924ea6757c478509936 /assets/weapons/goo_gun/Bullet.gd | |
parent | 85cf10772c6bc1390e9dfb07dddd6e204b856340 (diff) | |
download | project-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/Bullet.gd | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/assets/weapons/goo_gun/Bullet.gd b/assets/weapons/goo_gun/Bullet.gd index 1a4c01a..2edba6b 100644 --- a/assets/weapons/goo_gun/Bullet.gd +++ b/assets/weapons/goo_gun/Bullet.gd @@ -1,4 +1,10 @@ extends RigidBody +export var material : Material = null + +func _ready(): + if material != null: + $MeshInstance.set("material/0", material) + func _on_Bullet_body_entered(_body): queue_free() |