1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-06-25 16:14:43 -04:00

Advanced drag and drop

More precise drag and drop. Still has a few bugs, but most of the base is there.

- Removed translations.
- Cleaned up README
This commit is contained in:
Tony Bark 2023-12-07 21:45:26 -05:00
parent 805cbe2738
commit 2bc37e1100
18 changed files with 173 additions and 58 deletions

View file

@ -6,7 +6,7 @@
[ext_resource type="Texture2D" uid="uid://cardxswmgbmbv" path="res://sprites/clothes/owo_censor.svg" id="5"]
[ext_resource type="Texture2D" uid="uid://dnwdyi2d46hsm" path="res://sprites/character/eyes/eyes1.png" id="6"]
[ext_resource type="Texture2D" uid="uid://cbr37emgh11is" path="res://sprites/character/eyes/eyes2.png" id="7"]
[ext_resource type="Script" path="res://scripts/clothing/clothing.gd" id="7_58p8d"]
[ext_resource type="Script" path="res://scripts/clothing.gd" id="7_58p8d"]
[ext_resource type="Texture2D" uid="uid://ceifal0sxn0r7" path="res://sprites/character/eyes/eyes3.png" id="8"]
[ext_resource type="Texture2D" uid="uid://dujbine82hf7h" path="res://sprites/character/eyes/eyes4.png" id="9"]
[ext_resource type="Texture2D" uid="uid://cbptix4hhenyv" path="res://sprites/character/eyes/eyes5.png" id="10"]

15
scenes/demo.tscn Normal file
View file

@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://bguec0ft5ygk4"]
[ext_resource type="PackedScene" uid="uid://bvbelmb6rvy4f" path="res://scenes/platform.tscn" id="1_31w52"]
[ext_resource type="PackedScene" uid="uid://dn152ouc7l21p" path="res://scenes/object.tscn" id="2_cgl4f"]
[node name="Demo" type="Node2D"]
[node name="Platform" parent="." instance=ExtResource("1_31w52")]
position = Vector2(94, 117)
[node name="Platform2" parent="." instance=ExtResource("1_31w52")]
position = Vector2(419, 84)
[node name="Object" parent="." instance=ExtResource("2_cgl4f")]
position = Vector2(96, 117)

24
scenes/object.tscn Normal file
View file

@ -0,0 +1,24 @@
[gd_scene load_steps=4 format=3 uid="uid://dn152ouc7l21p"]
[ext_resource type="Texture2D" uid="uid://d1hpnolu3m1ho" path="res://godot.png" id="1_jjr7w"]
[ext_resource type="Script" path="res://scripts/object.gd" id="1_tyfcj"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_py2o1"]
size = Vector2(59, 59)
[node name="Object" type="Node2D"]
script = ExtResource("1_tyfcj")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_jjr7w")
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(0.5, -0.5)
shape = SubResource("RectangleShape2D_py2o1")
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_area_2d_body_exited"]
[connection signal="mouse_entered" from="Area2D" to="." method="_on_area_2d_mouse_entered"]
[connection signal="mouse_exited" from="Area2D" to="." method="_on_area_2d_mouse_exited"]

26
scenes/platform.tscn Normal file
View file

@ -0,0 +1,26 @@
[gd_scene load_steps=3 format=3 uid="uid://bvbelmb6rvy4f"]
[ext_resource type="Script" path="res://scripts/platform.gd" id="1_xgdk6"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ieyrm"]
size = Vector2(62, 61)
[node name="Platform" type="StaticBody2D"]
script = ExtResource("1_xgdk6")
[node name="ColorRect" type="ColorRect" parent="."]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -31.0
offset_top = -31.0
offset_right = 31.0
offset_bottom = 30.0
grow_horizontal = 2
grow_vertical = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -0.5)
shape = SubResource("RectangleShape2D_ieyrm")

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://crwoe1shep3qn"]
[ext_resource type="Script" path="res://scripts/clothing/clothing.gd" id="2_1si7t"]
[ext_resource type="Script" path="res://scripts/clothing.gd" id="2_1si7t"]
[ext_resource type="Texture2D" uid="uid://405burxtvied" path="res://sprites/clothes/sweat_pants.svg" id="3_h6yd3"]
[node name="Wordrobe" type="TabContainer"]