Skip to content

Commit

Permalink
intertactive inventary
Browse files Browse the repository at this point in the history
  • Loading branch information
Patataman committed Jul 26, 2021
1 parent ec1563e commit 52b3fea
Show file tree
Hide file tree
Showing 29 changed files with 685 additions and 52 deletions.
Binary file added assets/prototipos/elementos/items/berry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/prototipos/escena/Batalla/deck_pile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/prototipos/escena/Batalla/deck_pile_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/prototipos/escena/Batalla/deck_pile_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/prototipos/escena/Batalla/discard_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/prototipos/escena/Batalla/hud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/prototipos/escena/Batalla/status_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dani_sandbox/scenes/menu/Personalizar.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[ext_resource path="res://dani_sandbox/scripts/menu/CharactertMenu_a.gd" type="Script" id=2]
[ext_resource path="res://assets/sprites/cards_ilustrations/ilustration_placeholder.png" type="Texture" id=3]

[node name="HUD" type="CanvasLayer"]
[node name="Inventary" type="CanvasLayer"]
script = ExtResource( 2 )

[node name="Container" type="MarginContainer" parent="."]
Expand Down
7 changes: 6 additions & 1 deletion dani_sandbox/scripts/menu/CartaColeccion_a.gd
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
extends Control

signal a_mazo;
signal a_mazo


# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.


func init_image(card_tpye: String):
pass


func _on_CartaColeccion_gui_input(event):
""" Evento para saber cuándo el usuario hace click o hace click derecho en la carta
"""
Expand Down
4 changes: 4 additions & 0 deletions dani_sandbox/scripts/menu/CartaMazo_a.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ func _ready():
pass # Replace with function body.


func init_image(card_tpye: String):
pass


func _on_CartaMazo_gui_input(event):
""" Evento para saber cuándo el usuario hace click y así eliminarla (visualmente)
del mazo.
Expand Down
28 changes: 14 additions & 14 deletions real_deal/scenes/map/actors/Player.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ext_resource path="res://assets/prototipos/personaje/Prototipo Final/player_sprite.png" type="Texture" id=1]
[ext_resource path="res://real_deal/scripts/map/actors/Player.gd" type="Script" id=2]

[sub_resource type="CapsuleShape2D" id=11]
[sub_resource type="CapsuleShape2D" id=1]
radius = 64.9999
height = 66.5229

Expand All @@ -25,22 +25,22 @@ region = Rect2( 380, 0, 190, 211 )
[sub_resource type="AtlasTexture" id=5]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 570, 0, 190, 211 )
region = Rect2( 0, 0, 190, 211 )

[sub_resource type="AtlasTexture" id=6]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 190, 211 )
region = Rect2( 190, 0, 190, 211 )

[sub_resource type="AtlasTexture" id=7]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 190, 0, 190, 211 )
region = Rect2( 380, 0, 190, 211 )

[sub_resource type="AtlasTexture" id=8]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 380, 0, 190, 211 )
region = Rect2( 570, 0, 190, 211 )

[sub_resource type="AtlasTexture" id=9]
flags = 4
Expand All @@ -64,18 +64,18 @@ animations = [ {
"name": "walk-side",
"speed": 1.0
}, {
"frames": [ SubResource( 5 ) ],
"loop": true,
"name": "walk-up",
"speed": 1.0
}, {
"frames": [ SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ],
"frames": [ SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ],
"loop": false,
"name": "attack",
"speed": 8.0
}, {
"frames": [ SubResource( 9 ) ],
"loop": true,
"name": "walk-up",
"speed": 1.0
} ]

[sub_resource type="CapsuleShape2D" id=12]
[sub_resource type="CapsuleShape2D" id=11]
radius = 68.1066
height = 75.2926

Expand All @@ -91,7 +91,7 @@ __meta__ = {
speed = 450

[node name="PhysicsCollisions" type="CollisionShape2D" parent="."]
shape = SubResource( 11 )
shape = SubResource( 1 )

[node name="Camera2D" type="Camera2D" parent="."]
current = true
Expand All @@ -111,5 +111,5 @@ collision_mask = 58
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerInfluece"]
position = Vector2( 0, -0.44545 )
scale = Vector2( 1.001, 1 )
shape = SubResource( 12 )
shape = SubResource( 11 )
[connection signal="body_entered" from="PlayerInfluece" to="." method="_on_PlayerInfluece_body_entered"]
57 changes: 57 additions & 0 deletions real_deal/scenes/menu/CartaColeccion.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://assets/sprites/cards_ilustrations/ilustration_placeholder.png" type="Texture" id=1]
[ext_resource path="res://real_deal/scripts/menu/CartaColeccion.gd" type="Script" id=2]

[node name="CartaColeccion" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = -924.0
margin_bottom = -450.0
rect_min_size = Vector2( 100, 150 )
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="CardImage" type="TextureRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource( 1 )
expand = true
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Repeat" type="Label" parent="."]
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -28.8502
margin_top = -26.5903
margin_right = -6.8502
margin_bottom = -5.59027
text = "x3"
align = 1
valign = 1
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false
}

[node name="ColorRect" type="ColorRect" parent="Repeat"]
show_behind_parent = true
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -11.0
margin_top = -10.5
margin_right = 11.0
margin_bottom = 10.5
color = Color( 0, 0, 0, 0.278431 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="gui_input" from="." to="." method="_on_CartaColeccion_gui_input"]
55 changes: 55 additions & 0 deletions real_deal/scenes/menu/CartaMazo.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[gd_scene load_steps=5 format=2]

[ext_resource path="res://assets/fonts/Comfortaa-Bold.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://real_deal/scripts/menu/CartaMazo.gd" type="Script" id=2]

[sub_resource type="DynamicFont" id=1]
size = 21
font_data = ExtResource( 1 )

[sub_resource type="DynamicFont" id=2]
font_data = ExtResource( 1 )

[node name="CartaMazo" type="Control"]
margin_right = 250.0
margin_bottom = 40.0
rect_min_size = Vector2( 250, 40 )
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="ColorRect" type="ColorRect" parent="."]
margin_right = 250.0
margin_bottom = 40.0
mouse_filter = 2
color = Color( 0.258824, 0.513726, 0.94902, 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Valor" type="Label" parent="."]
margin_right = 57.5
margin_bottom = 27.0
custom_fonts/font = SubResource( 1 )
text = "23"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Nombre" type="Label" parent="."]
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 10.0
margin_top = -19.0
margin_right = -10.0
custom_fonts/font = SubResource( 2 )
text = "Nombre de la carta que puede ser largo"
align = 2
clip_text = true
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="gui_input" from="." to="." method="_on_CartaMazo_gui_input"]
Loading

0 comments on commit 52b3fea

Please sign in to comment.