placeholder gun animation and player scripts

This commit is contained in:
Alexey 2025-07-14 20:47:01 +03:00
commit ed684b694b
6 changed files with 137 additions and 85 deletions

View file

@ -0,0 +1,31 @@
extends RefCounted
class_name CommandStack
## Commands that can be pushed to stack
enum Command {
None,
TakeWeapon,
Shoot,
Reload,
HolsterWeapon,
TakeZaza,
LightZaza,
Smoke
}
var left_command_stack: Array[Command] = []
var right_command_stack: Array[Command] = []
func push(left_command: Command = Command.None, right_command: Command = Command.None):
left_command_stack.push_back(left_command)
right_command_stack.push_back(right_command)
func pop():
left_command_stack.pop_back()
right_command_stack.pop_back()
func current_left_command() -> Command:
return left_command_stack.back()
func current_right_command() -> Command:
return right_command_stack.back()

View file

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

View file

@ -0,0 +1,12 @@
extends RigidBody3D
var stack: CommandStack = CommandStack.new()
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass

View file

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