From eab9ca42f6887b9c21ea1a897bee4a81e8748c5d Mon Sep 17 00:00:00 2001 From: CactiChameleon9 Date: Mon, 25 Jul 2022 10:07:39 +0100 Subject: [PATCH] Make Card a class --- UI/Card.gd | 3 ++- project.godot | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/UI/Card.gd b/UI/Card.gd index 4d43a1d..2b8abd8 100644 --- a/UI/Card.gd +++ b/UI/Card.gd @@ -1,4 +1,5 @@ extends Node +class_name Card signal return_dice(dice_number) signal do_movement(movement_range) @@ -6,7 +7,7 @@ signal do_damage(damage, damage_range) signal do_effect(effect, effect_range) signal card_removed(card_self) -export (Resource) var card_info +export (Resource) var card_info = preload("res://Assets/CardDB/Default.tres") var input_dice = [] var addition_dice_amount = card_info.addition_amount diff --git a/project.godot b/project.godot index 908f128..82d086b 100644 --- a/project.godot +++ b/project.godot @@ -9,6 +9,11 @@ config_version=4 _global_script_classes=[ { +"base": "Node", +"class": "Card", +"language": "GDScript", +"path": "res://UI/Card.gd" +}, { "base": "Resource", "class": "CardResource", "language": "GDScript", @@ -20,6 +25,7 @@ _global_script_classes=[ { "path": "res://Characters/Character.gd" } ] _global_script_class_icons={ +"Card": "", "CardResource": "", "Character": "" }