feat: choose outfit from library when creating a dragon

This commit is contained in:
Gerard Gascón 2025-04-08 23:02:17 +02:00
parent fd8609c0ab
commit f07b28d2dc
22 changed files with 370 additions and 17 deletions

9
assets/outfits/hats.tres Normal file
View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="DragonOutfit" load_steps=3 format=3 uid="uid://cnhwn6kfcbjl5"]
[ext_resource type="Texture2D" uid="uid://s1gx0l4qciqn" path="res://assets/sprites/hat.png" id="1_ahj5i"]
[ext_resource type="Script" uid="uid://rw26nny160xh" path="res://src/dragon_outfit.gd" id="1_e7uo0"]
[resource]
script = ExtResource("1_e7uo0")
outfits = Array[Texture2D]([ExtResource("1_ahj5i")])
metadata/_custom_type_script = "uid://rw26nny160xh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="DragonOutfit" load_steps=3 format=3 uid="uid://etegcak2sphs"]
[ext_resource type="Texture2D" uid="uid://dc2uk6tqtwl4n" path="res://assets/sprites/shirt.png" id="1_136ph"]
[ext_resource type="Script" uid="uid://rw26nny160xh" path="res://src/dragon_outfit.gd" id="1_yaxr2"]
[resource]
script = ExtResource("1_yaxr2")
outfits = Array[Texture2D]([ExtResource("1_136ph")])
metadata/_custom_type_script = "uid://rw26nny160xh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="DragonOutfit" load_steps=3 format=3 uid="uid://ba5684xylts3f"]
[ext_resource type="Texture2D" uid="uid://8srlwinjr3tt" path="res://assets/sprites/shoes.png" id="1_2hegr"]
[ext_resource type="Script" uid="uid://rw26nny160xh" path="res://src/dragon_outfit.gd" id="1_lu1y3"]
[resource]
script = ExtResource("1_lu1y3")
outfits = Array[Texture2D]([ExtResource("1_2hegr")])
metadata/_custom_type_script = "uid://rw26nny160xh"

BIN
assets/sprites/hat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://s1gx0l4qciqn"
path="res://.godot/imported/hat.png-d10ab25b5ff6a88ab50e6c69248a3ef0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/hat.png"
dest_files=["res://.godot/imported/hat.png-d10ab25b5ff6a88ab50e6c69248a3ef0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/sprites/shirt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dc2uk6tqtwl4n"
path="res://.godot/imported/shirt.png-e59b3d32b60ac1a259719e0f7d9fdc17.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/shirt.png"
dest_files=["res://.godot/imported/shirt.png-e59b3d32b60ac1a259719e0f7d9fdc17.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/sprites/shoes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://8srlwinjr3tt"
path="res://.godot/imported/shoes.png-47dd2ca75c2aff89c900c933c1df27c2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/shoes.png"
dest_files=["res://.godot/imported/shoes.png-47dd2ca75c2aff89c900c933c1df27c2.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1