feat: added new sprites

This commit is contained in:
Gerard Gascón 2025-04-10 15:06:56 +02:00
parent 7c54b60337
commit b4594bdd43
43 changed files with 609 additions and 74 deletions

View file

@ -1,13 +1,13 @@
[gd_scene load_steps=10 format=3 uid="uid://fut42ruut302"]
[ext_resource type="Script" uid="uid://bfuos2kgfgber" path="res://scenes/dragon_editor/dragon_editor.gd" id="1_8vkll"]
[ext_resource type="Texture2D" uid="uid://fdqnc2qrrvn1" path="res://assets/sprites/icon.svg" id="2_un5ur"]
[ext_resource type="Resource" uid="uid://cnhwn6kfcbjl5" path="res://assets/outfits/hats.tres" id="2_vvtct"]
[ext_resource type="Texture2D" uid="uid://s1gx0l4qciqn" path="res://assets/sprites/hat.png" id="3_4q6gv"]
[ext_resource type="Resource" uid="uid://etegcak2sphs" path="res://assets/outfits/shirts.tres" id="3_xhgxf"]
[ext_resource type="Resource" uid="uid://ba5684xylts3f" path="res://assets/outfits/shoes.tres" id="4_1ivi1"]
[ext_resource type="Texture2D" uid="uid://dc2uk6tqtwl4n" path="res://assets/sprites/shirt.png" id="4_6sr44"]
[ext_resource type="Texture2D" uid="uid://8srlwinjr3tt" path="res://assets/sprites/shoes.png" id="5_wby0j"]
[ext_resource type="Texture2D" uid="uid://dl87ffgh2hl68" path="res://assets/sprites/dragons/DragonPet_drac01.png" id="5_xhgxf"]
[ext_resource type="Texture2D" uid="uid://12fv5nymaljj" path="res://assets/sprites/hats/DragonPet_barret_barretina.png" id="6_1ivi1"]
[ext_resource type="Texture2D" uid="uid://cs0ke244c33t2" path="res://assets/sprites/shirts/DragonPet_roba_armadura.png" id="7_giwys"]
[ext_resource type="Texture2D" uid="uid://onajhbpjtnil" path="res://assets/sprites/decor/DragonPet_acc_escut.png" id="8_udwtk"]
[ext_resource type="Script" uid="uid://mhudiyt5gnt1" path="res://scenes/dragon_editor/line_edit.gd" id="9_xhgxf"]
[node name="DragonEditor" type="Window"]
@ -61,13 +61,13 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -64.0
offset_top = -64.0
offset_right = 64.0
offset_bottom = 64.0
offset_left = -38.0
offset_top = -57.0
offset_right = 38.0
offset_bottom = 31.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_un5ur")
texture = ExtResource("5_xhgxf")
[node name="Hat" type="TextureRect" parent="CanvasLayer/Dragon"]
layout_mode = 1
@ -76,14 +76,13 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -90.0
offset_top = -109.0
offset_right = 93.0
offset_bottom = 74.0
offset_left = -38.0
offset_top = -44.0
offset_right = 38.0
offset_bottom = 44.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("3_4q6gv")
expand_mode = 1
texture = ExtResource("6_1ivi1")
[node name="Shirt" type="TextureRect" parent="CanvasLayer/Dragon"]
layout_mode = 1
@ -92,14 +91,13 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -113.0
offset_top = -59.0
offset_right = 124.0
offset_bottom = 79.0
offset_left = -38.0
offset_top = -44.0
offset_right = 38.0
offset_bottom = 44.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("4_6sr44")
expand_mode = 1
texture = ExtResource("7_giwys")
[node name="Shoes" type="TextureRect" parent="CanvasLayer/Dragon"]
layout_mode = 1
@ -108,14 +106,13 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -96.0
offset_top = -119.0
offset_right = 113.0
offset_bottom = 90.0
offset_left = -38.0
offset_top = -44.0
offset_right = 38.0
offset_bottom = 44.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("5_wby0j")
expand_mode = 1
texture = ExtResource("8_udwtk")
[node name="LineEdit" type="LineEdit" parent="CanvasLayer"]
offset_left = 59.0

View file

@ -4,7 +4,7 @@
[ext_resource type="PackedScene" uid="uid://baa8gpicw2yg0" path="res://scenes/dragons/dragon_sprite.tscn" id="2_l1h0r"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_6eaxg"]
size = Vector2(128, 128)
size = Vector2(76, 88)
[node name="Dragon" type="Area2D" node_paths=PackedStringArray("dragon")]
script = ExtResource("1_jccds")
@ -14,8 +14,8 @@ min_exit_time = 60.0
max_exit_time = 600.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 1)
position = Vector2(-2, 6)
shape = SubResource("RectangleShape2D_6eaxg")
[node name="Dragon" parent="CollisionShape2D" instance=ExtResource("2_l1h0r")]
position = Vector2(-64, -65)
position = Vector2(-38, -44)

View file

@ -1,13 +1,13 @@
[gd_scene load_steps=7 format=3 uid="uid://baa8gpicw2yg0"]
[ext_resource type="Texture2D" uid="uid://fdqnc2qrrvn1" path="res://assets/sprites/icon.svg" id="1_ixu8j"]
[ext_resource type="Script" uid="uid://bjiap06gs02j" path="res://scenes/dragons/dragon_sprite.gd" id="1_oaoux"]
[ext_resource type="Texture2D" uid="uid://s1gx0l4qciqn" path="res://assets/sprites/hat.png" id="2_hdh4v"]
[ext_resource type="Texture2D" uid="uid://dc2uk6tqtwl4n" path="res://assets/sprites/shirt.png" id="3_oaoux"]
[ext_resource type="Texture2D" uid="uid://8srlwinjr3tt" path="res://assets/sprites/shoes.png" id="4_yf7bj"]
[ext_resource type="Texture2D" uid="uid://dl87ffgh2hl68" path="res://assets/sprites/dragons/DragonPet_drac01.png" id="2_oaoux"]
[ext_resource type="Texture2D" uid="uid://12fv5nymaljj" path="res://assets/sprites/hats/DragonPet_barret_barretina.png" id="3_oaoux"]
[ext_resource type="Texture2D" uid="uid://b3xnii6r00hol" path="res://assets/sprites/shirts/DragonPet_roba_traje.png" id="4_oaoux"]
[ext_resource type="Texture2D" uid="uid://c1b8gp5uf2ehk" path="res://assets/sprites/decor/DragonPet_acc_rosa.png" id="5_stf6f"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oaoux"]
size = Vector2(128, 129)
size = Vector2(76, 88)
[node name="Dragon" type="Node2D" node_paths=PackedStringArray("hat", "shirt", "shoes", "name_label")]
script = ExtResource("1_oaoux")
@ -19,36 +19,27 @@ name_label = NodePath("Label")
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(64, 64.5)
position = Vector2(38, 44)
shape = SubResource("RectangleShape2D_oaoux")
[node name="Sprite" type="Sprite2D" parent="."]
position = Vector2(0, 1)
texture = ExtResource("1_ixu8j")
offset = Vector2(64, 64)
position = Vector2(38, 44)
texture = ExtResource("2_oaoux")
[node name="Hat" type="Sprite2D" parent="Sprite"]
position = Vector2(39, 22)
scale = Vector2(0.503906, 0.503906)
texture = ExtResource("2_hdh4v")
offset = Vector2(64, 64)
texture = ExtResource("3_oaoux")
[node name="Shirt" type="Sprite2D" parent="Sprite"]
position = Vector2(40, 56)
scale = Vector2(0.477783, 0.288361)
texture = ExtResource("3_oaoux")
offset = Vector2(64, 64)
texture = ExtResource("4_oaoux")
[node name="Shoes" type="Sprite2D" parent="Sprite"]
position = Vector2(48, 39)
scale = Vector2(0.353516, 0.353516)
texture = ExtResource("4_yf7bj")
offset = Vector2(64, 64)
texture = ExtResource("5_stf6f")
[node name="Label" type="Label" parent="."]
offset_top = 105.0
offset_right = 128.0
offset_bottom = 128.0
offset_left = -10.0
offset_top = 78.0
offset_right = 86.0
offset_bottom = 101.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 5

View file

@ -75,7 +75,7 @@ func move_window_to_bottom_right():
var work_area_position: Vector2i = DisplayServer.screen_get_usable_rect(display_index).position
var work_area_size: Vector2i = DisplayServer.screen_get_usable_rect(display_index).size
var window_size: Vector2i = Vector2i(work_area_size.y / 3 * 1.77777, work_area_size.y / 3)
var window_size: Vector2i = DisplayServer.window_get_size()
var new_position: Vector2i = work_area_position + Vector2i(work_area_size.x - window_size.x, work_area_size.y - window_size.y)

View file

@ -73,11 +73,3 @@ func _pick_random_screen_position() -> void:
)
_target_pos = random_pos
func set_scale(scale: float) -> void:
var original_size: Vector2i = size
size = Vector2i(size.x * scale, size.y * scale)
dragon.scale = Vector2(scale, scale)
position += Vector2i((original_size.x - size.x) / 2.0, (original_size.y - size.y) / 2.0)

View file

@ -7,10 +7,11 @@
[node name="DragonPopup" type="Window" node_paths=PackedStringArray("dragon", "draggable")]
disable_3d = true
transparent_bg = true
size = Vector2i(128, 128)
size = Vector2i(76, 88)
unresizable = true
borderless = true
transparent = true
content_scale_mode = 2
script = ExtResource("1_ctdir")
dragon_speed = 100.0
dragon = NodePath("Dragon")