Added SceneNode Loading
This commit is contained in:
13
scripts/resources/Weapons/Attachments/AttachmentResource.gd
Normal file
13
scripts/resources/Weapons/Attachments/AttachmentResource.gd
Normal file
@@ -0,0 +1,13 @@
|
||||
extends Resource
|
||||
|
||||
class_name AttachmentResource
|
||||
|
||||
@export var attachment_stats: AttachmentStats
|
||||
@export var attachment_scene: PackedScene
|
||||
|
||||
|
||||
func instantiate(parent: Node3D)->Attachment:
|
||||
var attachment_instance = attachment_scene.instantiate() as Attachment
|
||||
attachment_instance.init_Attachment(attachment_stats)
|
||||
parent.add_child(attachment_instance)
|
||||
return attachment_instance
|
||||
6
scripts/resources/Weapons/Attachments/AttachmentStats.gd
Normal file
6
scripts/resources/Weapons/Attachments/AttachmentStats.gd
Normal file
@@ -0,0 +1,6 @@
|
||||
extends Resource
|
||||
|
||||
class_name AttachmentStats
|
||||
|
||||
@export var damage: Damage
|
||||
@export var fire_rate: FireRate
|
||||
Reference in New Issue
Block a user