diff --git a/src/Menus/DragNDrop/DragNDropUI.tscn b/src/Menus/DragNDrop/DragNDropUI.tscn index a8e07b1..1dfdcd1 100644 --- a/src/Menus/DragNDrop/DragNDropUI.tscn +++ b/src/Menus/DragNDrop/DragNDropUI.tscn @@ -62,3 +62,5 @@ anchor_bottom = 0.87 margin_left = 2.0 margin_right = 0.0400085 margin_bottom = -30.9 + +[editable path="GenericCard1"] diff --git a/src/Menus/DragNDrop/DragSource.gd b/src/Menus/DragNDrop/DragSource.gd index a01508f..23e6a4e 100644 --- a/src/Menus/DragNDrop/DragSource.gd +++ b/src/Menus/DragNDrop/DragSource.gd @@ -4,6 +4,8 @@ export var Item:PackedScene export var PreviewIcon:Texture export var DeleteOnGrab:bool = false +var card_level = 0 + #if a drag is initiated here func get_drag_data(_pos): var ctrl = Control.new() @@ -19,13 +21,13 @@ func get_drag_data(_pos): return Item -#stuff can be dropped here -#eg you picked the wrong thing up, let go and it returns to nothingness +# stuff can be dropped here +# eg you picked the wrong thing up, let go and it returns to nothingness func can_drop_data(_pos, data): return typeof(data) == typeof(PackedScene) -#do nothing if stuff is dropped here +# do nothing if stuff is dropped here func drop_data(_pos, _data): pass @@ -37,3 +39,13 @@ func get_resized_texture(t: Texture, width: int = 0, height: int = 0): var itex = ImageTexture.new() itex.create_from_image(image,0) return itex + + +func upgrade_card(): + match card_level: + 0: + $AnimatedSprite.play("lvl1") + card_level += 1 + 1: + $AnimatedSprite.play("lvl2") + card_level += 1