1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-05-05 13:34:48 -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

@ -1 +1,3 @@
docs
*.md
.idea

View file

@ -1,25 +1,9 @@
# Dress Up Zack
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
![](screenshot.gif)Tony's Dress Up is a re-imagining of my first (and only) Flash game series, ZC's Dress Up that was developed back in 2007. Both this and the originals are heavily inspired by The Sims 2: Body Shop in their own unique ways.
![](screenshot.gif)
Tony's Dress Up is a re-imagining of my first (and only) Flash game series, ZC's Dress Up , developed back in 2007. Both this and the originals are heavily inspired by The Sims 2: Body Shop in their own unique ways.
I've included the original Flash releases in the ``/archive`` directory. They can be played using [Ruffle](https://ruffle.rs/)'s demo page.
## Getting Started
### Prerequisites
- Godot Engine 4
## License
The source and assets are licensed under the Artistic-2.0 License and CC-BY, respectfully - see the [LICENSE](LICENSE) and [ASSET-LICENSE](ASSET-LICENSE) for more details.
The source and assets are licensed under the GPL-3.0 License and CC-BY, respectfully - see the [LICENSE](LICENSE) and [ASSET-LICENSE](ASSET-LICENSE) for more details.
The Flash games included are closed source, but considered abandonware. Feel free to share them on archives.
## Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
The Flash games located in the `/archive` directory are proprietary, but considered abandonware. Any extracted assets are under the same license. Feel free to share them on archives.

BIN
godot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

34
godot.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d1hpnolu3m1ho"
path="res://.godot/imported/godot.png-5e0da45ed3d6786d5794553e04f58a8c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://godot.png"
dest_files=["res://.godot/imported/godot.png-5e0da45ed3d6786d5794553e04f58a8c.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

View file

@ -1,20 +0,0 @@
,en,sv
KENG,English,Engelsk
KSWD,Swedish,Svenska
KBOT,Pants,Byxor
KTOP,Shirts,Skjorta
KCLS,Classic,Klassisk
KUND,Underwear,Underkläder
KRUS,Resume,Återuppta
KPUS,Paused,Pausad
KMUS,Music,Musik
KGMO,Game Mode,Spelläge
KCRE,Credits,Eftertexter
KABO,About,Handla om
KLIC,License,Licens
KSOO,Coming Soon,Kommer snart
KPLY,Play,Spela
KEXT,Exit,Utgång
KHELP,Help,Hjälp
KSET,Settings,Inställningar
KLANG,Languages,Språk
1 en sv
2 KENG English Engelsk
3 KSWD Swedish Svenska
4 KBOT Pants Byxor
5 KTOP Shirts Skjorta
6 KCLS Classic Klassisk
7 KUND Underwear Underkläder
8 KRUS Resume Återuppta
9 KPUS Paused Pausad
10 KMUS Music Musik
11 KGMO Game Mode Spelläge
12 KCRE Credits Eftertexter
13 KABO About Handla om
14 KLIC License Licens
15 KSOO Coming Soon Kommer snart
16 KPLY Play Spela
17 KEXT Exit Utgång
18 KHELP Help Hjälp
19 KSET Settings Inställningar
20 KLANG Languages Språk

View file

@ -1,17 +0,0 @@
[remap]
importer="csv_translation"
type="Translation"
uid="uid://bdu3ytca7lxbp"
[deps]
files=["res://lang/local.en.translation", "res://lang/local.sv.translation"]
source_file="res://lang/local.csv"
dest_files=["res://lang/local.en.translation", "res://lang/local.sv.translation"]
[params]
compress=true
delimiter=0

Binary file not shown.

Binary file not shown.

View file

@ -22,6 +22,10 @@ config/macos_native_icon="res://icon.icns"
config/windows_native_icon="res://icon.ico"
name_sv="Tonys klä upp"
[autoload]
Global="*res://scripts/global.gd"
[debug]
gdscript/completion/autocomplete_setters_and_getters=true
@ -82,6 +86,11 @@ ui_pause={
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
]
}
click={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
[locale]

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"]

5
scripts/global.gd Normal file
View file

@ -0,0 +1,5 @@
# This project is licensed under the GPL-3.0 license.
# See the LICENSE file in the project root for more information.
extends Node
var is_dragging = false

41
scripts/object.gd Normal file
View file

@ -0,0 +1,41 @@
# This project is licensed under the GPL-3.0 license.
# See the LICENSE file in the project root for more information.
extends Node2D
var is_draggable = false
var is_inside_dropable = false
var body_ref
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if is_draggable:
if Input.is_action_just_pressed("click"):
global_position = get_global_mouse_position()
elif Input.is_action_just_released("click"):
is_draggable = false
var tween = get_tree().create_tween()
if is_inside_dropable:
tween.tween_property(self,"postion",body_ref.position,0.2).set_ease(Tween.EASE_OUT)
else:
tween.tween_property(self,"global_postion",body_ref.position,0.2).set_ease(Tween.EASE_OUT)
func _on_area_2d_body_entered(body):
if body.is_in_group('dropable'):
is_inside_dropable = true
scale = Vector2(1.05, 1.05)
func _on_area_2d_body_exited(body:StaticBody2D):
if body.is_in_group('dropable'):
is_inside_dropable = false
scale = Vector2(1.05, 1.05)
func _on_area_2d_mouse_entered():
if not Global.is_dragging:
is_draggable = true
scale = Vector2(1.05, 1.05)
func _on_area_2d_mouse_exited():
if not Global.is_dragging:
is_draggable = false
scale = Vector2(1, 1)

12
scripts/platform.gd Normal file
View file

@ -0,0 +1,12 @@
# This project is licensed under the GPL-3.0 license.
# See the LICENSE file in the project root for more information.
extends StaticBody2D
func _ready():
modulate = Color(Color.MEDIUM_PURPLE, 0.7)
func _process(delta):
if Global.is_dragging:
visible = true
else:
visible = false