Merged basic scene and basic scripts

This commit is contained in:
Alexey 2025-07-14 18:33:36 +03:00
commit 667c1b22b2
4 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,6 @@
extends Node3D
class_name Barrel
func can_fire() -> bool:
return true

View file

@ -0,0 +1 @@
uid://bvurg687pt06s

View file

@ -0,0 +1,24 @@
extends Resource
## Base class for all fire modes
class_name BaseFireMode
## Assigned barrel to shoot out of
var barrel : Barrel
## Fires projectile out of barrel [br]
## Returns [color=green]true[/color] if barrel can shoot,[br]
## Returns [color=red]false[/color] if barrel cannot shoot
func _fire() -> bool:
return true
## Invoked when fire button is just pressed or reload ended while fire button is still pressed
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() -> void:
pass

View file

@ -0,0 +1 @@
uid://icsatakb034w