weapon base exports
This commit is contained in:
parent
708f11c0f4
commit
39fb87f62d
3 changed files with 30 additions and 0 deletions
15
base/scenes/weapons/weapon_base.tscn
Normal file
15
base/scenes/weapons/weapon_base.tscn
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://bb6ovrbusyxpi"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bf0q3xe6oavqa" path="res://base/scripts/weapons/weapon_base.gd" id="1_rwatx"]
|
||||||
|
[ext_resource type="Script" uid="uid://bvurg687pt06s" path="res://base/scripts/weapons/barrel.gd" id="2_n0n7m"]
|
||||||
|
[ext_resource type="AnimationLibrary" uid="uid://cw8bt4hqxpk55" path="res://base/assets/guns/placeholder/placeholder.tres" id="2_p83j3"]
|
||||||
|
|
||||||
|
[node name="Weapon" type="Node3D" node_paths=PackedStringArray("barrel")]
|
||||||
|
script = ExtResource("1_rwatx")
|
||||||
|
barrel = NodePath("Barrel")
|
||||||
|
uses_hands = Array[int]([1])
|
||||||
|
animation_library = ExtResource("2_p83j3")
|
||||||
|
|
||||||
|
[node name="Barrel" type="Node3D" parent="."]
|
||||||
|
script = ExtResource("2_n0n7m")
|
||||||
|
metadata/_custom_type_script = "uid://bvurg687pt06s"
|
14
base/scripts/weapons/weapon_base.gd
Normal file
14
base/scripts/weapons/weapon_base.gd
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
extends Node3D
|
||||||
|
|
||||||
|
class_name Weapon
|
||||||
|
|
||||||
|
@export var barrel: Barrel
|
||||||
|
@export var uses_hands: Array[CommandQueue.Side]
|
||||||
|
|
||||||
|
@export var max_ammo: int = 7
|
||||||
|
var ammo: int = max_ammo
|
||||||
|
@export var ammo_consumption: int = 1
|
||||||
|
|
||||||
|
@export var fire_mode: BaseFireMode
|
||||||
|
## Weapon animation library. Should contain "static", "fire", "reload" animations
|
||||||
|
@export var animation_library: AnimationLibrary
|
1
base/scripts/weapons/weapon_base.gd.uid
Normal file
1
base/scripts/weapons/weapon_base.gd.uid
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uid://bf0q3xe6oavqa
|
Loading…
Add table
Add a link
Reference in a new issue