mirror of
https://github.com/tonytins/dressupzack
synced 2025-06-25 08:04:43 -04:00
WIP redesign
- Redesigned UI - Imported old theme - Switched to original character sprite - Simplified clothes
This commit is contained in:
parent
2bc37e1100
commit
ed75c25fef
38 changed files with 622 additions and 1166 deletions
11
scripts/character.gd
Normal file
11
scripts/character.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends Node2D
|
||||
|
||||
@onready var _eyes = $Eyes
|
||||
@onready var _tail = $Tail
|
||||
@onready var _mouth = $Mouth
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
_eyes.play("default")
|
||||
_tail.play("default")
|
||||
_mouth.play("default")
|
|
@ -1,8 +1,3 @@
|
|||
# This project is licensed under the GPL-3.0 license.
|
||||
# See the LICENSE file in the project root for more information.
|
||||
extends Control
|
||||
|
||||
func _ready():
|
||||
var version = ProjectSettings.get_setting("application/config/version")
|
||||
var verLabel = $VersionLbl
|
||||
verLabel.text = "v" + version
|
||||
|
|
|
@ -5,20 +5,17 @@ extends Node2D
|
|||
var is_draggable = false
|
||||
var is_inside_dropable = false
|
||||
var body_ref
|
||||
var offset: Vector2
|
||||
|
||||
# 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()
|
||||
if Input.is_action_just_pressed("click"):
|
||||
offset = get_global_mouse_position() - global_position
|
||||
Global.is_dragging = true
|
||||
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)
|
||||
|
||||
Global.is_dragging = false
|
||||
|
||||
func _on_area_2d_body_entered(body):
|
||||
if body.is_in_group('dropable'):
|
||||
is_inside_dropable = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue