generated from krampus/template-godot4
25 lines
360 B
GDScript
25 lines
360 B
GDScript
class_name Spray extends Node3D
|
|
## Abstract base class for spraygun types
|
|
|
|
var firing := false
|
|
|
|
|
|
func _fire() -> void:
|
|
pass
|
|
|
|
|
|
func _idle() -> void:
|
|
pass
|
|
|
|
|
|
## Called each frame that this spray is being fired.
|
|
func fire() -> void:
|
|
firing = true
|
|
_fire()
|
|
|
|
|
|
## Called each frame that this spray is not being fired.
|
|
func idle() -> void:
|
|
firing = false
|
|
_idle()
|