You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
942 B
26 lines
942 B
extends Resource |
|
class_name WeaponData |
|
|
|
## Resource that stores weapon statistics and properties |
|
## Can be reused for both equipped weapons and world pickups |
|
|
|
enum Hand { MAIN_HAND, OFF_HAND, TWO_HAND } |
|
|
|
@export_category("Weapon Info") |
|
@export var weapon_name: String = "Weapon" |
|
@export_multiline var description: String = "" |
|
@export var hand_type: Hand = Hand.MAIN_HAND |
|
|
|
@export_category("Combat Stats") |
|
@export var damage: float = 10.0 |
|
@export var attack_range: float = 3.0 |
|
@export var attack_cooldown: float = 0.5 |
|
@export var attack_animation: String = "Attack1" # Animation to play when attacking |
|
|
|
@export_category("Visual") |
|
@export var mesh_scene: PackedScene # The 3D mesh for this weapon |
|
@export var icon: Texture2D # Optional icon for UI |
|
|
|
@export_category("Physics (for world pickups)") |
|
@export var pickup_radius: float = 1.5 # How close player needs to be to pick up |
|
@export var weight: float = 1.0 # Mass when dropped in world
|
|
|