Compare commits
10 commits
130dc27efa
...
49c3ea4076
Author | SHA1 | Date | |
---|---|---|---|
|
49c3ea4076 | ||
|
91d6c7855e | ||
|
5b6edfa836 | ||
|
359da7b3a3 | ||
|
cf08e821bc | ||
|
f60105d56a | ||
|
ba06aacff2 | ||
|
2d87d3beab | ||
|
7064af0707 | ||
|
0f6f75e8c5 |
22 changed files with 777 additions and 9 deletions
121
core/Cur6C3A.tmp
Normal file
121
core/Cur6C3A.tmp
Normal file
|
@ -0,0 +1,121 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://524sv8spw6go"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://q1rdbr8uh78r" path="res://textures/cursor_default.tres" id="1_50ts1"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdstohvc7pvot" path="res://textures/cursor_click.tres" id="1_h0do2"]
|
||||
[ext_resource type="Texture2D" uid="uid://buxws7r3kn0d7" path="res://textures/cursor_grab_01.tres" id="3_fj3w4"]
|
||||
[ext_resource type="Texture2D" uid="uid://pbahcjllgjjq" path="res://textures/cursor_grab_02.tres" id="4_153q8"]
|
||||
[ext_resource type="Texture2D" uid="uid://6fajq480n7se" path="res://textures/cursor_grab_03.tres" id="5_tsejy"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_h2l04"]
|
||||
script/source = "extends Node2D
|
||||
|
||||
const Speed:float = 900
|
||||
|
||||
var spaceState
|
||||
var query
|
||||
var CastResult
|
||||
var old_result
|
||||
var selectedSticker
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if not OS.is_debug_build():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CONFINED_HIDDEN)
|
||||
query = PhysicsPointQueryParameters2D.new()
|
||||
spaceState = get_world_2d()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
|
||||
#region Mouse Position
|
||||
position = get_global_mouse_position()
|
||||
#endregion
|
||||
|
||||
pointcast()
|
||||
cursor_look()
|
||||
|
||||
|
||||
func pointcast():
|
||||
query.collide_with_areas = true
|
||||
query.position = get_global_mouse_position()
|
||||
CastResult = spaceState.direct_space_state.intersect_point(query)
|
||||
if ( (CastResult.size() > 0) and (old_result != CastResult) ):
|
||||
old_result = CastResult
|
||||
for _result in CastResult:
|
||||
if (_result.collider.input_pickable == true):
|
||||
selectedSticker = _result.collider.get_parent()
|
||||
print(\"selected sticker %\",selectedSticker)
|
||||
|
||||
|
||||
if (CastResult.size() == 0):
|
||||
CastResult.clear()
|
||||
old_result = null
|
||||
selectedSticker = null
|
||||
|
||||
func cursor_look():
|
||||
$AnimatedSprite2D.play(\"default\")
|
||||
if (Input.is_action_pressed(\"select\")):
|
||||
if (selectedSticker):
|
||||
$AnimatedSprite2D.play(\"grab\")
|
||||
else:
|
||||
$AnimatedSprite2D.play(\"click\")
|
||||
else:
|
||||
if (selectedSticker):
|
||||
$AnimatedSprite2D.play(\"grab_intro\")
|
||||
|
||||
|
||||
"
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_u3xkr"]
|
||||
resource_local_to_scene = true
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_h0do2")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"click",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_50ts1")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_fj3w4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("4_153q8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("5_tsejy")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"grab",
|
||||
"speed": 7.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_fj3w4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"grab_intro",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="Cursor" type="Node2D"]
|
||||
top_level = true
|
||||
script = SubResource("GDScript_h2l04")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
scale = Vector2(1.5, 1.5)
|
||||
sprite_frames = SubResource("SpriteFrames_u3xkr")
|
||||
animation = &"grab"
|
||||
centered = false
|
||||
offset = Vector2(-80, -190)
|
121
core/Cur9BFD.tmp
Normal file
121
core/Cur9BFD.tmp
Normal file
|
@ -0,0 +1,121 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://524sv8spw6go"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://q1rdbr8uh78r" path="res://textures/cursor_default.tres" id="1_50ts1"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdstohvc7pvot" path="res://textures/cursor_click.tres" id="1_h0do2"]
|
||||
[ext_resource type="Texture2D" uid="uid://buxws7r3kn0d7" path="res://textures/cursor_grab_01.tres" id="3_fj3w4"]
|
||||
[ext_resource type="Texture2D" uid="uid://pbahcjllgjjq" path="res://textures/cursor_grab_02.tres" id="4_153q8"]
|
||||
[ext_resource type="Texture2D" uid="uid://6fajq480n7se" path="res://textures/cursor_grab_03.tres" id="5_tsejy"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_h2l04"]
|
||||
script/source = "extends Node2D
|
||||
|
||||
const Speed:float = 900
|
||||
|
||||
var spaceState
|
||||
var query
|
||||
var CastResult
|
||||
var old_result
|
||||
var selectedSticker
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if not OS.is_debug_build():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CONFINED_HIDDEN)
|
||||
query = PhysicsPointQueryParameters2D.new()
|
||||
spaceState = get_world_2d()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
|
||||
#region Mouse Position
|
||||
position = get_global_mouse_position()
|
||||
#endregion
|
||||
|
||||
pointcast()
|
||||
cursor_look()
|
||||
|
||||
|
||||
func pointcast():
|
||||
query.collide_with_areas = true
|
||||
query.position = get_global_mouse_position()
|
||||
CastResult = spaceState.direct_space_state.intersect_point(query)
|
||||
if ( (CastResult.size() > 0) and (old_result != CastResult) ):
|
||||
old_result = CastResult
|
||||
for _result in CastResult:
|
||||
if (_result.collider.input_pickable == true):
|
||||
selectedSticker = _result.collider.get_parent()
|
||||
print(\"selected sticker %\",selectedSticker)
|
||||
|
||||
|
||||
if (CastResult.size() == 0):
|
||||
CastResult.clear()
|
||||
old_result = null
|
||||
selectedSticker = null
|
||||
|
||||
func cursor_look():
|
||||
$AnimatedSprite2D.play(\"default\")
|
||||
if (Input.is_action_pressed(\"select\")):
|
||||
if (selectedSticker):
|
||||
$AnimatedSprite2D.play(\"grab\")
|
||||
else:
|
||||
$AnimatedSprite2D.play(\"click\")
|
||||
if (selectedSticker):
|
||||
$AnimatedSprite2D.play(\"grab_intro\")
|
||||
|
||||
|
||||
"
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_u3xkr"]
|
||||
resource_local_to_scene = true
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_h0do2")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"click",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_50ts1")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_fj3w4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("4_153q8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("5_tsejy")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"grab",
|
||||
"speed": 7.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_fj3w4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"grab_intro",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="Cursor" type="Node2D"]
|
||||
top_level = true
|
||||
script = SubResource("GDScript_h2l04")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
scale = Vector2(1.5, 1.5)
|
||||
sprite_frames = SubResource("SpriteFrames_u3xkr")
|
||||
animation = &"grab"
|
||||
autoplay = "grab"
|
||||
centered = false
|
||||
offset = Vector2(-80, -190)
|
160
core/Cursor.tscn
Normal file
160
core/Cursor.tscn
Normal file
|
@ -0,0 +1,160 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://524sv8spw6go"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://q1rdbr8uh78r" path="res://textures/cursor_default.tres" id="1_50ts1"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdstohvc7pvot" path="res://textures/cursor_click.tres" id="1_h0do2"]
|
||||
[ext_resource type="Texture2D" uid="uid://buxws7r3kn0d7" path="res://textures/cursor_grab_01.tres" id="3_fj3w4"]
|
||||
[ext_resource type="Texture2D" uid="uid://pbahcjllgjjq" path="res://textures/cursor_grab_02.tres" id="4_153q8"]
|
||||
[ext_resource type="Texture2D" uid="uid://6fajq480n7se" path="res://textures/cursor_grab_03.tres" id="5_tsejy"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_h2l04"]
|
||||
script/source = "extends Node2D
|
||||
|
||||
const Speed:float = 900
|
||||
|
||||
var spaceState
|
||||
var query
|
||||
var CastResult
|
||||
var old_result
|
||||
var selectedSticker
|
||||
enum CURSOR_STATE {DEFAULT, CLICK, GRAB, GRABBED}
|
||||
var currentCursorState:CURSOR_STATE
|
||||
var oldCursorState:CURSOR_STATE
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if not OS.is_debug_build():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CONFINED_HIDDEN)
|
||||
query = PhysicsPointQueryParameters2D.new()
|
||||
spaceState = get_world_2d()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
|
||||
#region Mouse Position
|
||||
position = get_global_mouse_position()
|
||||
#endregion
|
||||
|
||||
pointcast()
|
||||
cursor_look()
|
||||
|
||||
|
||||
func isSticker(selectedObject:Node):
|
||||
var _isSticker:bool = false
|
||||
var _tags = getTags(selectedObject)
|
||||
if (_tags.size() > 0):
|
||||
if (_tags.find(\"sticker\") != -1):
|
||||
_isSticker = true
|
||||
|
||||
return _isSticker
|
||||
|
||||
func getTags(selectedObject:Node):
|
||||
var _tags: Array
|
||||
if (selectedObject.has_meta(\"tags\")):
|
||||
_tags = selectedObject.get_meta(\"tags\")
|
||||
return _tags
|
||||
else:
|
||||
printerr(\"no tags inside %\",selectedObject)
|
||||
return _tags
|
||||
|
||||
|
||||
func pointcast():
|
||||
query.collide_with_areas = true
|
||||
query.position = get_global_mouse_position()
|
||||
CastResult = spaceState.direct_space_state.intersect_point(query)
|
||||
if ( (CastResult.size() > 0) and (old_result != CastResult) ):
|
||||
old_result = CastResult
|
||||
#if (CastResult.size()> 2):
|
||||
#breakpoint # should not detect multiple areas
|
||||
for _result in CastResult:
|
||||
if (_result.collider.input_pickable == true):
|
||||
selectedSticker = _result.collider.get_parent()
|
||||
if (isSticker(selectedSticker)):
|
||||
print(\"selected sticker %\",selectedSticker)
|
||||
else:
|
||||
selectedSticker = null
|
||||
if (CastResult.size() == 0 ):
|
||||
CastResult.clear()
|
||||
old_result = null
|
||||
selectedSticker = null
|
||||
|
||||
func cursor_look():
|
||||
|
||||
if (Input.is_action_pressed(\"select\")):
|
||||
if (selectedSticker):
|
||||
currentCursorState = CURSOR_STATE.GRABBED
|
||||
else:
|
||||
currentCursorState = CURSOR_STATE.CLICK
|
||||
else:
|
||||
if (selectedSticker):
|
||||
currentCursorState = CURSOR_STATE.GRAB
|
||||
else:
|
||||
currentCursorState = CURSOR_STATE.DEFAULT
|
||||
|
||||
if (currentCursorState != oldCursorState):
|
||||
oldCursorState = currentCursorState
|
||||
match oldCursorState:
|
||||
CURSOR_STATE.DEFAULT:
|
||||
$AnimatedSprite2D.play(\"default\")
|
||||
CURSOR_STATE.CLICK:
|
||||
$AnimatedSprite2D.play(\"click\")
|
||||
CURSOR_STATE.GRAB:
|
||||
$AnimatedSprite2D.play(\"grab_intro\")
|
||||
CURSOR_STATE.GRABBED:
|
||||
$AnimatedSprite2D.play(\"grab\")
|
||||
"
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_u3xkr"]
|
||||
resource_local_to_scene = true
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_h0do2")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"click",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_50ts1")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_fj3w4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("4_153q8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("5_tsejy")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"grab",
|
||||
"speed": 7.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_fj3w4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"grab_intro",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="Cursor" type="Node2D"]
|
||||
top_level = true
|
||||
script = SubResource("GDScript_h2l04")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
scale = Vector2(1.5, 1.5)
|
||||
sprite_frames = SubResource("SpriteFrames_u3xkr")
|
||||
animation = &"grab"
|
||||
autoplay = "grab"
|
||||
frame = 2
|
||||
frame_progress = 1.0
|
||||
centered = false
|
||||
offset = Vector2(-80, -190)
|
23
core/Sticker.gd
Normal file
23
core/Sticker.gd
Normal file
|
@ -0,0 +1,23 @@
|
|||
extends Node
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_area_2d_mouse_entered():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_area_2d_mouse_exited():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_tree_entered():
|
||||
pass # Replace with function body.
|
30
core/Sticker.tscn
Normal file
30
core/Sticker.tscn
Normal file
|
@ -0,0 +1,30 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://kbso0l2uk2n7"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_4kxk0"]
|
||||
script/source = "extends Area2D
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _on_mouse_entered():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_mouse_exited():
|
||||
pass # Replace with function body.
|
||||
"
|
||||
|
||||
[node name="StickerDetection" type="Area2D"]
|
||||
monitoring = false
|
||||
script = SubResource("GDScript_4kxk0")
|
||||
|
||||
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
|
|
@ -5,7 +5,7 @@ extends CharacterBody2D
|
|||
@export var CurrentHat: CanvasTexture
|
||||
|
||||
const SPEED = 1000.0
|
||||
|
||||
const MOUSESPEED = 10.0
|
||||
func teleport(location:Transform2D , direction:float = 1):
|
||||
transform = location
|
||||
scale = Vector2(direction,1)
|
||||
|
@ -25,6 +25,8 @@ func changeSkin(NewSkin:CanvasTexture,_NewHat:CanvasTexture = null):
|
|||
func get_input():
|
||||
var directionX = Input.get_axis("move_left", "move_right")
|
||||
var directionY = Input.get_axis("move_up", "move_down")
|
||||
var mouseDirectionX = Input.get_axis("mouse_left", "mouse_right")
|
||||
var mouseDirectionY = Input.get_axis("mouse_up", "mouse_down")
|
||||
#region Movement
|
||||
## Get the input direction and handle the movement/deceleration.
|
||||
if directionX :
|
||||
|
@ -36,6 +38,8 @@ func get_input():
|
|||
else:
|
||||
velocity.y = move_toward(velocity.y, 0, SPEED)
|
||||
#endregion
|
||||
var wantedMousePosition = get_viewport().get_mouse_position()+(Vector2(mouseDirectionX,mouseDirectionY)*MOUSESPEED)
|
||||
get_viewport().warp_mouse(wantedMousePosition)
|
||||
#region Animation
|
||||
if (directionX < 0):
|
||||
$Skeleton2D/root/Hips.set_scale(Vector2(1, 1))
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
|
||||
@export var InitialPlayer :PackedScene
|
||||
@export var InitialMap :PackedScene
|
||||
|
||||
|
@ -20,14 +22,15 @@ func transition_to_scene(new_scene: PackedScene, spawn_location = Vector2(0,0),
|
|||
player = $CurrentScene.find_child("player",true)
|
||||
if (player):
|
||||
player.teleport(spawn_location, spawn_direction)
|
||||
else:
|
||||
else: #Spawn the player if there is none
|
||||
if (InitialPlayer):
|
||||
player = InitialPlayer.instantiate()
|
||||
player.set_name("player")
|
||||
add_child(player)
|
||||
current_scene.get_child(0).add_child(player)
|
||||
else:
|
||||
printerr("No Initial player found")
|
||||
#endregion
|
||||
|
||||
func _on_ready():
|
||||
transition_to_scene(InitialMap,Vector2(0,0),1)
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ platform="Linux/X11"
|
|||
runnable=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
export_filter="scenes"
|
||||
export_files=PackedStringArray("res://maps/mapManager.tscn", "res://maps/map1.tscn", "res://maps/mainMenu.tscn")
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="builds/StickerClone.x86_64"
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://wlqsvbqpcbh"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://wlqsvbqpcbh"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cacwy4tka88k1" path="res://maps/map1.tres" id="1_pt5vq"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxharyv0ajr37" path="res://textures/atlas/DioramaEntrance_All_01_SPRT.png" id="2_n7y5f"]
|
||||
[ext_resource type="Texture2D" uid="uid://c5bd2ta3esnib" path="res://extracted/4010-A Tiny Sticker Tale review pic 1.jpg" id="3_yh2wy"]
|
||||
[ext_resource type="PackedScene" uid="uid://bddcriwo55x8k" path="res://prefab/prefab_woddenbridge.tscn" id="4_okpsn"]
|
||||
[ext_resource type="Texture2D" uid="uid://dx8jpmxtm2cdx" path="res://textures/pattern/Pattern_Forest.png" id="5_i137q"]
|
||||
[ext_resource type="Texture2D" uid="uid://cun14l52f477p" path="res://textures/atlas/Bushes_All_01_SPRT.png" id="5_xmosd"]
|
||||
[ext_resource type="PackedScene" uid="uid://domcpxdf6lqpb" path="res://prefab/free_sticker.tscn" id="6_3fkbm"]
|
||||
[ext_resource type="Texture2D" uid="uid://chuv25pm2vqen" path="res://textures/atlas/Rocks_All_01_SPRT.png" id="8_itp05"]
|
||||
[ext_resource type="PackedScene" uid="uid://6ww1g2enfdx3" path="res://prefab/solid_sticker.tscn" id="9_nxjul"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_js06g"]
|
||||
|
||||
|
@ -16,7 +20,39 @@ region = Rect2(252, 16, 108, 256)
|
|||
atlas = ExtResource("2_n7y5f")
|
||||
region = Rect2(12, 96, 216, 112)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_lfx7b"]
|
||||
radius = 80.0
|
||||
height = 254.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rn40i"]
|
||||
atlas = ExtResource("5_xmosd")
|
||||
region = Rect2(736, 96, 224, 160)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_b3366"]
|
||||
radius = 70.08
|
||||
height = 150.2
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vun1v"]
|
||||
atlas = ExtResource("8_itp05")
|
||||
region = Rect2(288, 256, 192, 160)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4cdlc"]
|
||||
size = Vector2(133.06, 62.73)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wpoj4"]
|
||||
atlas = ExtResource("8_itp05")
|
||||
region = Rect2(1440, 1376, 256, 256)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bkpsv"]
|
||||
radius = 115.4
|
||||
height = 230.8
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hk5e3"]
|
||||
size = Vector2(201.89, 146.45)
|
||||
|
||||
[node name="Map1" type="Node2D"]
|
||||
z_as_relative = false
|
||||
y_sort_enabled = true
|
||||
material = SubResource("ShaderMaterial_js06g")
|
||||
|
||||
[node name="Container" type="Control" parent="."]
|
||||
|
@ -56,6 +92,8 @@ texture = ExtResource("5_i137q")
|
|||
stretch_mode = 1
|
||||
|
||||
[node name="Floors05Sprt" type="Sprite2D" parent="."]
|
||||
z_index = -1
|
||||
z_as_relative = false
|
||||
scale = Vector2(6, 6)
|
||||
texture = ExtResource("1_pt5vq")
|
||||
region_rect = Rect2(0, 0, 1024, 992)
|
||||
|
@ -96,3 +134,60 @@ top_level = true
|
|||
position = Vector2(78, -148)
|
||||
scale = Vector2(6.15, 6.15)
|
||||
texture = ExtResource("3_yh2wy")
|
||||
|
||||
[node name="Bush1" parent="." instance=ExtResource("6_3fkbm")]
|
||||
position = Vector2(-2161, 1140)
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Bush6" parent="." instance=ExtResource("6_3fkbm")]
|
||||
position = Vector2(-1556, 293)
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Bush7" parent="." instance=ExtResource("6_3fkbm")]
|
||||
position = Vector2(712, 293)
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Bush9" parent="." instance=ExtResource("6_3fkbm")]
|
||||
position = Vector2(1004, -2257)
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Bush8" parent="." instance=ExtResource("6_3fkbm")]
|
||||
position = Vector2(-1616, -1651)
|
||||
offset = Vector2(-137.285, -179.785)
|
||||
flip_h = true
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Bush10" parent="." instance=ExtResource("6_3fkbm")]
|
||||
position = Vector2(-2063, -2116)
|
||||
texture = SubResource("AtlasTexture_rn40i")
|
||||
offset = Vector2(-108.615, -141.38)
|
||||
flip_h = true
|
||||
Shape = SubResource("CapsuleShape2D_b3366")
|
||||
Position = Vector2(0, -48.95)
|
||||
|
||||
[node name="Bush11" parent="." instance=ExtResource("6_3fkbm")]
|
||||
position = Vector2(2208, 2337)
|
||||
texture = SubResource("AtlasTexture_rn40i")
|
||||
offset = Vector2(-108.615, -141.38)
|
||||
Shape = SubResource("CapsuleShape2D_b3366")
|
||||
Position = Vector2(0, -48.95)
|
||||
|
||||
[node name="Rock1" parent="." instance=ExtResource("9_nxjul")]
|
||||
position = Vector2(-1807, 2030)
|
||||
texture = SubResource("AtlasTexture_vun1v")
|
||||
offset = Vector2(-78.385, -130.2)
|
||||
StickerShape = SubResource("CapsuleShape2D_b3366")
|
||||
Position = Vector2(8.56, -52.395)
|
||||
CollisionShape = SubResource("RectangleShape2D_4cdlc")
|
||||
CollisionPosition = Vector2(7.915, -31.39)
|
||||
CollisionRotation = 0.0
|
||||
|
||||
[node name="Rock2" parent="." instance=ExtResource("9_nxjul")]
|
||||
position = Vector2(-2248, 1895)
|
||||
texture = SubResource("AtlasTexture_wpoj4")
|
||||
offset = Vector2(-126.11, -220.56)
|
||||
StickerShape = SubResource("CapsuleShape2D_bkpsv")
|
||||
Position = Vector2(0, -89.75)
|
||||
CollisionShape = SubResource("RectangleShape2D_hk5e3")
|
||||
CollisionPosition = Vector2(0, -66.02)
|
||||
CollisionRotation = 0.0
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://d382cexpr4075"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://d382cexpr4075"]
|
||||
|
||||
[ext_resource type="Script" path="res://core/sceneInstance.gd" id="1_p0vo1"]
|
||||
[ext_resource type="PackedScene" uid="uid://0m1hk2nu4bps" path="res://core/player.tscn" id="2_fyjh8"]
|
||||
[ext_resource type="PackedScene" uid="uid://wlqsvbqpcbh" path="res://maps/map1.tscn" id="2_qgqfi"]
|
||||
[ext_resource type="PackedScene" uid="uid://524sv8spw6go" path="res://core/Cursor.tscn" id="4_uwedi"]
|
||||
|
||||
[node name="MapManager" type="Node2D"]
|
||||
script = ExtResource("1_p0vo1")
|
||||
|
@ -11,4 +12,6 @@ InitialMap = ExtResource("2_qgqfi")
|
|||
|
||||
[node name="CurrentScene" type="Node2D" parent="."]
|
||||
|
||||
[node name="Cursor" parent="." instance=ExtResource("4_uwedi")]
|
||||
|
||||
[connection signal="ready" from="." to="." method="_on_ready"]
|
||||
|
|
49
prefab/free_sticker.tscn
Normal file
49
prefab/free_sticker.tscn
Normal file
|
@ -0,0 +1,49 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://domcpxdf6lqpb"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cun14l52f477p" path="res://textures/atlas/Bushes_All_01_SPRT.png" id="1_1wk1p"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2wdar"]
|
||||
atlas = ExtResource("1_1wk1p")
|
||||
region = Rect2(384, 64, 288, 224)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_uqtu8"]
|
||||
script/source = "@tool
|
||||
extends Sprite2D
|
||||
|
||||
@export_group(\"Sticker Detection Shape\")
|
||||
@export var Shape :Shape2D:
|
||||
set(new_shape):
|
||||
Shape = new_shape
|
||||
$Area2D/CollisionShape2D.shape = Shape
|
||||
$Area2D/CollisionShape2D.queue_redraw()
|
||||
@export var Position :Vector2:
|
||||
set(new_position):
|
||||
Position = new_position
|
||||
$Area2D/CollisionShape2D.position = Position
|
||||
$Area2D/CollisionShape2D.queue_redraw()
|
||||
@export var Rotation :Vector2:
|
||||
set(new_rotation):
|
||||
Rotation = new_rotation
|
||||
$Area2D/CollisionShape2D.rotation = Rotation
|
||||
$Area2D/CollisionShape2D.queue_redraw()
|
||||
|
||||
"
|
||||
|
||||
[node name="FreeSticker1" type="Sprite2D"]
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = SubResource("AtlasTexture_2wdar")
|
||||
centered = false
|
||||
offset = Vector2(-161.055, -179.785)
|
||||
script = SubResource("GDScript_uqtu8")
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
position = Vector2(-4.46976, -71.6294)
|
||||
rotation = 1.5708
|
||||
|
||||
[connection signal="property_list_changed" from="." to="." method="_on_property_list_changed"]
|
|
@ -10,6 +10,7 @@ region = Rect2(72, 1392, 216, 272)
|
|||
[node name="WoodenBridge" type="Sprite2D"]
|
||||
scale = Vector2(5.71296, 5.71296)
|
||||
texture = SubResource("AtlasTexture_nkyhf")
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="BridgeNode" parent="." instance=ExtResource("2_te8ug")]
|
||||
position = Vector2(1788, 788)
|
||||
|
|
79
prefab/solid_sticker.tscn
Normal file
79
prefab/solid_sticker.tscn
Normal file
|
@ -0,0 +1,79 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://6ww1g2enfdx3"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cun14l52f477p" path="res://textures/atlas/Bushes_All_01_SPRT.png" id="1_ssqve"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2wdar"]
|
||||
atlas = ExtResource("1_ssqve")
|
||||
region = Rect2(384, 64, 288, 224)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_uqtu8"]
|
||||
script/source = "@tool
|
||||
extends Sprite2D
|
||||
|
||||
@export_group(\"Sticker Detection Shape\")
|
||||
@export var StickerShape :Shape2D:
|
||||
set(new_shape):
|
||||
StickerShape = new_shape
|
||||
$Area2D/StickerShape2D.shape = StickerShape
|
||||
$Area2D/StickerShape2D.queue_redraw()
|
||||
@export var Position :Vector2:
|
||||
set(new_position):
|
||||
Position = new_position
|
||||
$Area2D/StickerShape2D.position = Position
|
||||
$Area2D/StickerShape2D.queue_redraw()
|
||||
@export var Rotation :Vector2:
|
||||
set(new_rotation):
|
||||
Rotation = new_rotation
|
||||
$Area2D/StickerShape2D.rotation = Rotation
|
||||
$Area2D/StickerShape2D.queue_redraw()
|
||||
|
||||
@export_group(\"Collision Shape\")
|
||||
@export var CollisionShape :Shape2D:
|
||||
set(new_CollisionShape):
|
||||
CollisionShape = new_CollisionShape
|
||||
$StaticBody2D/CollisionShape2D.shape = CollisionShape
|
||||
$StaticBody2D/CollisionShape2D.queue_redraw()
|
||||
@export var CollisionPosition :Vector2:
|
||||
set(new_CollisionPosition):
|
||||
CollisionPosition = new_CollisionPosition
|
||||
$StaticBody2D/CollisionShape2D.position = CollisionPosition
|
||||
$StaticBody2D/CollisionShape2D.queue_redraw()
|
||||
@export var CollisionRotation :float:
|
||||
set(new_ColissionRotation):
|
||||
CollisionRotation = new_ColissionRotation
|
||||
$StaticBody2D/CollisionShape2D.rotation = CollisionRotation
|
||||
$StaticBody2D/CollisionShape2D.queue_redraw()
|
||||
|
||||
"
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ep5ck"]
|
||||
size = Vector2(104.391, 20.3774)
|
||||
|
||||
[node name="SolidSticker1" type="Sprite2D"]
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = SubResource("AtlasTexture_2wdar")
|
||||
centered = false
|
||||
offset = Vector2(-161.055, -179.785)
|
||||
script = SubResource("GDScript_uqtu8")
|
||||
CollisionPosition = null
|
||||
CollisionRotation = null
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="StickerShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
position = Vector2(-4.46976, -71.6294)
|
||||
rotation = 1.5708
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
|
||||
position = Vector2(2.10341, -10.8836)
|
||||
scale = Vector2(1, 1)
|
||||
shape = SubResource("RectangleShape2D_ep5ck")
|
||||
debug_color = Color(0.996033, 0, 0.194446, 0.42)
|
||||
|
||||
[connection signal="property_list_changed" from="." to="." method="_on_property_list_changed"]
|
|
@ -76,6 +76,26 @@ menu={
|
|||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
mouse_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
mouse_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
mouse_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
mouse_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":2,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://docoki1q4vvfh"
|
||||
path="res://.godot/imported/SPRT_Hand.png-10f10cc13ae4b0331523734719309ebe.ctex"
|
||||
path="res://.godot/imported/SPRT_Hand.png-f682339cd646a6350ee80c8d3fc09b3b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://extracted/Texture2D/SPRT_Hand.png"
|
||||
dest_files=["res://.godot/imported/SPRT_Hand.png-10f10cc13ae4b0331523734719309ebe.ctex"]
|
||||
source_file="res://textures/atlas/SPRT_Hand.png"
|
||||
dest_files=["res://.godot/imported/SPRT_Hand.png-f682339cd646a6350ee80c8d3fc09b3b.ctex"]
|
||||
|
||||
[params]
|
||||
|
9
textures/cursor_click.tres
Normal file
9
textures/cursor_click.tres
Normal file
|
@ -0,0 +1,9 @@
|
|||
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bdstohvc7pvot"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://docoki1q4vvfh" path="res://textures/atlas/SPRT_Hand.png" id="1_2ch11"]
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_2ch11")
|
||||
region = Rect2(0, 0, 256, 256)
|
||||
margin = Rect2(-5, 5, 5, 5)
|
||||
filter_clip = true
|
7
textures/cursor_default.tres
Normal file
7
textures/cursor_default.tres
Normal file
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://q1rdbr8uh78r"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://docoki1q4vvfh" path="res://textures/atlas/SPRT_Hand.png" id="1_n6y0a"]
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_n6y0a")
|
||||
region = Rect2(0, 0, 256, 256)
|
21
textures/cursor_grab.tres
Normal file
21
textures/cursor_grab.tres
Normal file
|
@ -0,0 +1,21 @@
|
|||
[gd_resource type="AnimatedTexture" load_steps=5 format=3 uid="uid://sgwck5ca17s1"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://q1rdbr8uh78r" path="res://textures/cursor_default.tres" id="1_k7xih"]
|
||||
[ext_resource type="Texture2D" uid="uid://docoki1q4vvfh" path="res://textures/atlas/SPRT_Hand.png" id="1_ltia2"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gpt2k"]
|
||||
atlas = ExtResource("1_ltia2")
|
||||
region = Rect2(0, 256, 256, 256)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hq7jx"]
|
||||
atlas = ExtResource("1_ltia2")
|
||||
region = Rect2(256, 256, 256, 256)
|
||||
|
||||
[resource]
|
||||
frames = 3
|
||||
frame_0/texture = ExtResource("1_k7xih")
|
||||
frame_0/duration = 0.5
|
||||
frame_1/texture = SubResource("AtlasTexture_gpt2k")
|
||||
frame_1/duration = 0.5
|
||||
frame_2/texture = SubResource("AtlasTexture_hq7jx")
|
||||
frame_2/duration = 0.5
|
7
textures/cursor_grab_01.tres
Normal file
7
textures/cursor_grab_01.tres
Normal file
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://buxws7r3kn0d7"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://docoki1q4vvfh" path="res://textures/atlas/SPRT_Hand.png" id="1_xhy8h"]
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_xhy8h")
|
||||
region = Rect2(256, 0, 256, 256)
|
7
textures/cursor_grab_02.tres
Normal file
7
textures/cursor_grab_02.tres
Normal file
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://pbahcjllgjjq"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://docoki1q4vvfh" path="res://textures/atlas/SPRT_Hand.png" id="1_it2wc"]
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_it2wc")
|
||||
region = Rect2(0, 256, 256, 256)
|
7
textures/cursor_grab_03.tres
Normal file
7
textures/cursor_grab_03.tres
Normal file
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://6fajq480n7se"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://docoki1q4vvfh" path="res://textures/atlas/SPRT_Hand.png" id="1_r8woc"]
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_r8woc")
|
||||
region = Rect2(256, 256, 256, 256)
|
Loading…
Reference in a new issue