From 5aba6c7b4777f255b00be15cbdd53f2f20416831 Mon Sep 17 00:00:00 2001 From: ankdev Date: Tue, 27 Oct 2026 14:13:38 +0100 Subject: [PATCH] Cambio en los controles --- .../shared/prototype_sprite_frames.tres | 429 ++++++++++-------- ui/mobile_controls/mobile_controls.tscn | 32 +- 2 files changed, 256 insertions(+), 205 deletions(-) diff --git a/player/characters/shared/prototype_sprite_frames.tres b/player/characters/shared/prototype_sprite_frames.tres index 221e437..0a8d920 100644 --- a/player/characters/shared/prototype_sprite_frames.tres +++ b/player/characters/shared/prototype_sprite_frames.tres @@ -1,6 +1,36 @@ [gd_resource type="SpriteFrames" format=3 uid="uid://s2xmt6mpri5c"] -[ext_resource type="Texture2D" path="res://assets/characters/ankarde/player_pixel.svg" id="1_pixel"] +[ext_resource type="Texture2D" uid="uid://dvelbmij33o8r" path="res://assets/characters/ankarde/player_pixel.svg" id="1_pixel"] + +[sub_resource type="AtlasTexture" id="fall_0"] +atlas = ExtResource("1_pixel") +region = Rect2(256, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="fall_1"] +atlas = ExtResource("1_pixel") +region = Rect2(320, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="ground_pound_0"] +atlas = ExtResource("1_pixel") +region = Rect2(192, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="ground_pound_1"] +atlas = ExtResource("1_pixel") +region = Rect2(256, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="hurt_0"] +atlas = ExtResource("1_pixel") +region = Rect2(192, 256, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="hurt_1"] +atlas = ExtResource("1_pixel") +region = Rect2(256, 256, 64, 64) +filter_clip = true [sub_resource type="AtlasTexture" id="idle_0"] atlas = ExtResource("1_pixel") @@ -22,36 +52,6 @@ atlas = ExtResource("1_pixel") region = Rect2(192, 0, 64, 64) filter_clip = true -[sub_resource type="AtlasTexture" id="walk_0"] -atlas = ExtResource("1_pixel") -region = Rect2(256, 0, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="walk_1"] -atlas = ExtResource("1_pixel") -region = Rect2(320, 0, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="walk_2"] -atlas = ExtResource("1_pixel") -region = Rect2(384, 0, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="walk_3"] -atlas = ExtResource("1_pixel") -region = Rect2(448, 0, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="walk_4"] -atlas = ExtResource("1_pixel") -region = Rect2(0, 64, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="walk_5"] -atlas = ExtResource("1_pixel") -region = Rect2(64, 64, 64, 64) -filter_clip = true - [sub_resource type="AtlasTexture" id="jump_0"] atlas = ExtResource("1_pixel") region = Rect2(128, 64, 64, 64) @@ -62,14 +62,19 @@ atlas = ExtResource("1_pixel") region = Rect2(192, 64, 64, 64) filter_clip = true -[sub_resource type="AtlasTexture" id="fall_0"] +[sub_resource type="AtlasTexture" id="land_0"] atlas = ExtResource("1_pixel") -region = Rect2(256, 64, 64, 64) +region = Rect2(320, 128, 64, 64) filter_clip = true -[sub_resource type="AtlasTexture" id="fall_1"] +[sub_resource type="AtlasTexture" id="land_1"] atlas = ExtResource("1_pixel") -region = Rect2(320, 64, 64, 64) +region = Rect2(384, 128, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="land_2"] +atlas = ExtResource("1_pixel") +region = Rect2(448, 128, 64, 64) filter_clip = true [sub_resource type="AtlasTexture" id="punch_0"] @@ -97,46 +102,6 @@ atlas = ExtResource("1_pixel") region = Rect2(128, 128, 64, 64) filter_clip = true -[sub_resource type="AtlasTexture" id="ground_pound_0"] -atlas = ExtResource("1_pixel") -region = Rect2(192, 128, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="ground_pound_1"] -atlas = ExtResource("1_pixel") -region = Rect2(256, 128, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="land_0"] -atlas = ExtResource("1_pixel") -region = Rect2(320, 128, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="land_1"] -atlas = ExtResource("1_pixel") -region = Rect2(384, 128, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="land_2"] -atlas = ExtResource("1_pixel") -region = Rect2(448, 128, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="special_start_0"] -atlas = ExtResource("1_pixel") -region = Rect2(0, 192, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="special_start_1"] -atlas = ExtResource("1_pixel") -region = Rect2(64, 192, 64, 64) -filter_clip = true - -[sub_resource type="AtlasTexture" id="special_start_2"] -atlas = ExtResource("1_pixel") -region = Rect2(128, 192, 64, 64) -filter_clip = true - [sub_resource type="AtlasTexture" id="special_0"] atlas = ExtResource("1_pixel") region = Rect2(192, 192, 64, 64) @@ -177,130 +142,216 @@ atlas = ExtResource("1_pixel") region = Rect2(128, 256, 64, 64) filter_clip = true -[sub_resource type="AtlasTexture" id="hurt_0"] +[sub_resource type="AtlasTexture" id="special_start_0"] atlas = ExtResource("1_pixel") -region = Rect2(192, 256, 64, 64) +region = Rect2(0, 192, 64, 64) filter_clip = true -[sub_resource type="AtlasTexture" id="hurt_1"] +[sub_resource type="AtlasTexture" id="special_start_1"] atlas = ExtResource("1_pixel") -region = Rect2(256, 256, 64, 64) +region = Rect2(64, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="special_start_2"] +atlas = ExtResource("1_pixel") +region = Rect2(128, 192, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_0"] +atlas = ExtResource("1_pixel") +region = Rect2(256, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_1"] +atlas = ExtResource("1_pixel") +region = Rect2(320, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_2"] +atlas = ExtResource("1_pixel") +region = Rect2(384, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_3"] +atlas = ExtResource("1_pixel") +region = Rect2(448, 0, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_4"] +atlas = ExtResource("1_pixel") +region = Rect2(0, 64, 64, 64) +filter_clip = true + +[sub_resource type="AtlasTexture" id="walk_5"] +atlas = ExtResource("1_pixel") +region = Rect2(64, 64, 64, 64) filter_clip = true [resource] -animations = [ -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("idle_0")}, -{"duration": 1.0, "texture": SubResource("idle_1")}, -{"duration": 1.0, "texture": SubResource("idle_2")}, -{"duration": 1.0, "texture": SubResource("idle_3")} -], -"loop": true, -"name": &"idle", -"speed": 5.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("walk_0")}, -{"duration": 1.0, "texture": SubResource("walk_1")}, -{"duration": 1.0, "texture": SubResource("walk_2")}, -{"duration": 1.0, "texture": SubResource("walk_3")}, -{"duration": 1.0, "texture": SubResource("walk_4")}, -{"duration": 1.0, "texture": SubResource("walk_5")} -], -"loop": true, -"name": &"walk", -"speed": 10.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("jump_0")}, -{"duration": 1.0, "texture": SubResource("jump_1")} -], -"loop": false, -"name": &"jump", -"speed": 9.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("fall_0")}, -{"duration": 1.0, "texture": SubResource("fall_1")} -], -"loop": true, +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("fall_0") +}, { +"duration": 1.0, +"texture": SubResource("fall_1") +}], +"loop": 1, "name": &"fall", "speed": 7.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("punch_0")}, -{"duration": 0.75, "texture": SubResource("punch_1")}, -{"duration": 1.15, "texture": SubResource("punch_2")}, -{"duration": 0.8, "texture": SubResource("punch_3")}, -{"duration": 1.3, "texture": SubResource("punch_4")} -], -"loop": false, -"name": &"punch", -"speed": 18.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("ground_pound_0")}, -{"duration": 1.0, "texture": SubResource("ground_pound_1")} -], -"loop": true, +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("ground_pound_0") +}, { +"duration": 1.0, +"texture": SubResource("ground_pound_1") +}], +"loop": 1, "name": &"ground_pound", "speed": 12.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("land_0")}, -{"duration": 1.0, "texture": SubResource("land_1")}, -{"duration": 1.0, "texture": SubResource("land_2")} -], -"loop": false, -"name": &"land", -"speed": 16.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("special_start_0")}, -{"duration": 1.0, "texture": SubResource("special_start_1")}, -{"duration": 1.0, "texture": SubResource("special_start_2")} -], -"loop": false, -"name": &"special_start", -"speed": 9.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("special_0")}, -{"duration": 1.0, "texture": SubResource("special_1")}, -{"duration": 1.0, "texture": SubResource("special_2")}, -{"duration": 1.0, "texture": SubResource("special_3")}, -{"duration": 1.0, "texture": SubResource("special_4")}, -{"duration": 1.0, "texture": SubResource("special_5")} -], -"loop": true, -"name": &"special", -"speed": 12.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("special_end_0")}, -{"duration": 1.0, "texture": SubResource("special_end_1")} -], -"loop": false, -"name": &"special_end", -"speed": 7.0 -}, -{ -"frames": [ -{"duration": 1.0, "texture": SubResource("hurt_0")}, -{"duration": 1.0, "texture": SubResource("hurt_1")} -], -"loop": false, +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("hurt_0") +}, { +"duration": 1.0, +"texture": SubResource("hurt_1") +}], +"loop": 0, "name": &"hurt", "speed": 12.0 -} -] +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("idle_0") +}, { +"duration": 1.0, +"texture": SubResource("idle_1") +}, { +"duration": 1.0, +"texture": SubResource("idle_2") +}, { +"duration": 1.0, +"texture": SubResource("idle_3") +}], +"loop": 1, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("jump_0") +}, { +"duration": 1.0, +"texture": SubResource("jump_1") +}], +"loop": 0, +"name": &"jump", +"speed": 9.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("land_0") +}, { +"duration": 1.0, +"texture": SubResource("land_1") +}, { +"duration": 1.0, +"texture": SubResource("land_2") +}], +"loop": 0, +"name": &"land", +"speed": 16.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("punch_0") +}, { +"duration": 0.75, +"texture": SubResource("punch_1") +}, { +"duration": 1.15, +"texture": SubResource("punch_2") +}, { +"duration": 0.8, +"texture": SubResource("punch_3") +}, { +"duration": 1.3, +"texture": SubResource("punch_4") +}], +"loop": 0, +"name": &"punch", +"speed": 18.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("special_0") +}, { +"duration": 1.0, +"texture": SubResource("special_1") +}, { +"duration": 1.0, +"texture": SubResource("special_2") +}, { +"duration": 1.0, +"texture": SubResource("special_3") +}, { +"duration": 1.0, +"texture": SubResource("special_4") +}, { +"duration": 1.0, +"texture": SubResource("special_5") +}], +"loop": 1, +"name": &"special", +"speed": 12.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("special_end_0") +}, { +"duration": 1.0, +"texture": SubResource("special_end_1") +}], +"loop": 0, +"name": &"special_end", +"speed": 7.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("special_start_0") +}, { +"duration": 1.0, +"texture": SubResource("special_start_1") +}, { +"duration": 1.0, +"texture": SubResource("special_start_2") +}], +"loop": 0, +"name": &"special_start", +"speed": 9.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("walk_0") +}, { +"duration": 1.0, +"texture": SubResource("walk_1") +}, { +"duration": 1.0, +"texture": SubResource("walk_2") +}, { +"duration": 1.0, +"texture": SubResource("walk_3") +}, { +"duration": 1.0, +"texture": SubResource("walk_4") +}, { +"duration": 1.0, +"texture": SubResource("walk_5") +}], +"loop": 1, +"name": &"walk", +"speed": 10.0 +}] diff --git a/ui/mobile_controls/mobile_controls.tscn b/ui/mobile_controls/mobile_controls.tscn index 9301e7a..9452f27 100644 --- a/ui/mobile_controls/mobile_controls.tscn +++ b/ui/mobile_controls/mobile_controls.tscn @@ -92,10 +92,10 @@ anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = -280.0 -offset_top = -132.0 -offset_right = -170.0 -offset_bottom = -32.0 +offset_left = -177.0 +offset_top = -316.0 +offset_right = -34.0 +offset_bottom = -186.0 grow_horizontal = 0 grow_vertical = 0 focus_mode = 0 @@ -116,10 +116,10 @@ anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = -154.0 -offset_top = -132.0 -offset_right = -44.0 -offset_bottom = -32.0 +offset_left = -330.0 +offset_top = -228.0 +offset_right = -220.0 +offset_bottom = -128.0 grow_horizontal = 0 grow_vertical = 0 focus_mode = 0 @@ -140,10 +140,10 @@ anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = -280.0 -offset_top = -256.0 -offset_right = -170.0 -offset_bottom = -156.0 +offset_left = -160.0 +offset_top = -155.0 +offset_right = -50.0 +offset_bottom = -55.0 grow_horizontal = 0 grow_vertical = 0 focus_mode = 0 @@ -163,10 +163,10 @@ anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = -154.0 -offset_top = -256.0 -offset_right = -44.0 -offset_bottom = -156.0 +offset_left = -163.0 +offset_top = -520.0 +offset_right = -53.0 +offset_bottom = -420.0 grow_horizontal = 0 grow_vertical = 0 focus_mode = 0