FireMode is now local to scene, tree is now a variable
This commit is contained in:
parent
bb914ca82c
commit
8aa37bd929
1 changed files with 6 additions and 3 deletions
|
@ -5,7 +5,10 @@ class_name BaseFireMode
|
|||
|
||||
## Assigned barrel to shoot out of
|
||||
var barrel : Barrel
|
||||
var tree : Tree
|
||||
|
||||
func _init() -> void:
|
||||
resource_local_to_scene = true
|
||||
|
||||
## Fires projectile out of barrel [br]
|
||||
## Returns [color=green]true[/color] if barrel can shoot,[br]
|
||||
|
@ -15,15 +18,15 @@ func _fire() -> bool:
|
|||
|
||||
|
||||
## Invoked when fire button is just pressed or reload ended while fire button is still pressed
|
||||
func _on_fire_begin(tree : SceneTree) -> void:
|
||||
func _on_fire_begin() -> void:
|
||||
pass
|
||||
|
||||
|
||||
## Invoked when fire button is just released or reload started while fire button is still pressed
|
||||
func _on_fire_end(tree : SceneTree) -> void:
|
||||
func _on_fire_end() -> void:
|
||||
pass
|
||||
|
||||
|
||||
## Invoked every process frame on active fire mode
|
||||
func _process(tree : SceneTree) -> void:
|
||||
func _process() -> void:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue