Merge branch 'feature/sticker' into develop
# Conflicts: # textures/sprites/props_fire1.tres
This commit is contained in:
commit
d520cd58b9
15 changed files with 518 additions and 433 deletions
|
@ -1,14 +1,14 @@
|
|||
extends Node2D
|
||||
|
||||
var spaceState
|
||||
var spaceState:World2D
|
||||
var query : PhysicsPointQueryParameters2D
|
||||
var CastResult : Array
|
||||
|
||||
var hoveredObjects : Array
|
||||
var hoveredObject
|
||||
var hoveredSticker
|
||||
var grabbedSticker
|
||||
var grabbedStickerOffset
|
||||
var hoveredColliders : Array
|
||||
var hoveredCollider:CollisionObject2D
|
||||
var hoveredStickerNode:Sticker
|
||||
var grabbedStickerNode:Sticker
|
||||
var grabbedStickerOffset:Vector2
|
||||
|
||||
enum CURSOR_STATE {DEFAULT, CLICK, GRAB, GRABBED}
|
||||
var currentCursorState:CURSOR_STATE = CURSOR_STATE.DEFAULT
|
||||
|
@ -29,40 +29,41 @@ func _process(_delta):
|
|||
#endregion
|
||||
pointcast()
|
||||
cursor_look()
|
||||
if (grabbedSticker != null):
|
||||
grabbedSticker.position = grabbedStickerOffset+get_global_mouse_position()
|
||||
if (grabbedStickerNode != null):
|
||||
grabbedStickerNode.get_parent().position = grabbedStickerOffset+get_global_mouse_position()
|
||||
|
||||
|
||||
func pointcast():
|
||||
resetCast()
|
||||
query.collide_with_areas = true
|
||||
query.collide_with_bodies = false
|
||||
query.position = get_global_mouse_position()
|
||||
CastResult = spaceState.direct_space_state.intersect_point(query)
|
||||
# CastResult is not reliable. Objects are added randomly in the array
|
||||
# so we need to filter/sort the trace result
|
||||
if ( CastResult.size() > 0 and (grabbedSticker == null)):
|
||||
if ( CastResult.size() > 0 and (grabbedStickerNode == null)):
|
||||
|
||||
#region Fill HoveredObjects
|
||||
#region Fill hoveredColliders
|
||||
for _object in CastResult:
|
||||
if(_object.collider.input_pickable == true):
|
||||
hoveredObjects.append(_object.collider.get_parent())
|
||||
hoveredColliders.append(_object.collider) #Get the object that have the collision
|
||||
#endregion
|
||||
if (hoveredObjects.size() > 0):
|
||||
if (hoveredObjects.size() >= 2):
|
||||
sortByPosY(hoveredObjects,false)
|
||||
if (hoveredObjects[0] != hoveredObject):
|
||||
if (hoveredColliders.size() > 0):
|
||||
if (hoveredColliders.size() >= 2):
|
||||
sortByPosY(hoveredColliders,false)
|
||||
if (hoveredColliders[0] != hoveredCollider):
|
||||
$GrabTimer.stop()
|
||||
if (hoveredObject and hoveredObject.has_method("on_unhover")):
|
||||
hoveredObject.on_unhover()
|
||||
hoveredObject = hoveredObjects[0]
|
||||
if (hoveredObject and hoveredObject.has_method("on_hover")):
|
||||
hoveredObject.on_hover()
|
||||
print("Current hovered object :", hoveredObject)
|
||||
if (Global.isSticker(hoveredObject)):
|
||||
hoveredSticker = hoveredObject
|
||||
print("Current hovered sticker :", hoveredSticker)
|
||||
if (hoveredCollider and hoveredCollider.has_method("on_unhover")):
|
||||
hoveredCollider.on_unhover()
|
||||
hoveredCollider = hoveredColliders[0]
|
||||
if (hoveredCollider and hoveredCollider.has_method("on_hover")):
|
||||
hoveredCollider.on_hover()
|
||||
print("Current hovered object :", hoveredCollider)
|
||||
if (Global.isSticker(hoveredCollider)):
|
||||
hoveredStickerNode = hoveredCollider
|
||||
print("Current hovered sticker :", hoveredStickerNode)
|
||||
else:
|
||||
hoveredSticker = null
|
||||
hoveredStickerNode = null
|
||||
else:
|
||||
resetCast(true)
|
||||
else:
|
||||
|
@ -70,13 +71,14 @@ func pointcast():
|
|||
|
||||
func resetCast(bFull = false):
|
||||
CastResult.clear()
|
||||
hoveredObjects.clear()
|
||||
hoveredColliders.clear()
|
||||
if bFull:
|
||||
if (hoveredObject != null and hoveredObject.has_method("on_unhover")):
|
||||
hoveredObject.on_unhover()
|
||||
hoveredObject = null
|
||||
hoveredSticker = null
|
||||
if (hoveredCollider != null and hoveredCollider.has_method("on_unhover") and (hoveredCollider != grabbedStickerNode)):
|
||||
hoveredCollider.on_unhover()
|
||||
hoveredCollider = null
|
||||
hoveredStickerNode = null
|
||||
|
||||
## Sort objects by parent's Y position
|
||||
func sortByPosY(objects: Array, ascending_order: bool = true):
|
||||
var _tempArray :Array
|
||||
_tempArray = objects
|
||||
|
@ -89,7 +91,7 @@ func sortByPosY(objects: Array, ascending_order: bool = true):
|
|||
|
||||
func comparePosY(a, b):
|
||||
#print("Compare ",a," at ",a.position.y, " and ",b," at ",b.position.y )
|
||||
return a.position.y < b.position.y
|
||||
return a.get_parent().position.y < b.get_parent().position.y #Sticker are always at 0, so we need parent position
|
||||
|
||||
|
||||
func _input(rawInputEvent:InputEvent):
|
||||
|
@ -98,37 +100,37 @@ func _input(rawInputEvent:InputEvent):
|
|||
$GrabTimer.start()
|
||||
if (rawInputEvent.is_action_released("select")):
|
||||
$GrabTimer.stop()
|
||||
if (grabbedSticker != null):
|
||||
if (grabbedStickerNode != null):
|
||||
grab_end()
|
||||
|
||||
func grab_start():
|
||||
if (hoveredSticker and grabbedSticker == null):
|
||||
grabbedSticker = hoveredSticker
|
||||
if (hoveredStickerNode and grabbedStickerNode == null):
|
||||
grabbedStickerNode = hoveredStickerNode
|
||||
|
||||
print("Grabbed ", grabbedSticker)
|
||||
grabbedStickerOffset = grabbedSticker.position - get_global_mouse_position()
|
||||
print("offset =", grabbedStickerOffset, " Stickpos:",grabbedSticker.position,"-",get_global_mouse_position() )
|
||||
if (grabbedSticker.has_method("on_grab")):
|
||||
grabbedSticker.on_grab(grabbedStickerOffset)
|
||||
print("Grabbed ", grabbedStickerNode)
|
||||
grabbedStickerOffset = grabbedStickerNode.get_parent().position - get_global_mouse_position()
|
||||
print("offset =", grabbedStickerOffset, " Stickpos:",grabbedStickerNode.get_parent().position,"-",get_global_mouse_position() )
|
||||
if (grabbedStickerNode.has_method("on_grab")):
|
||||
grabbedStickerNode.on_grab(grabbedStickerOffset)
|
||||
|
||||
func grab_end():
|
||||
grabbedSticker.on_released()
|
||||
if (grabbedStickerNode.has_method("on_released")):
|
||||
grabbedStickerNode.on_released()
|
||||
|
||||
print("stopg grabbin at ",query.position )
|
||||
DebugDraw.points.append(query.position)
|
||||
DebugDraw.drawPoints()
|
||||
#TODO: Drop the sticker or maybe he will auto-drop ?
|
||||
|
||||
grabbedSticker = null
|
||||
grabbedStickerNode = null
|
||||
|
||||
func cursorClick():
|
||||
if (hoveredObject and hoveredObject.has_method("on_click")):
|
||||
hoveredObject.on_click()
|
||||
if (hoveredCollider and hoveredCollider.has_method("on_click")):
|
||||
hoveredCollider.on_click()
|
||||
|
||||
func cursor_look():
|
||||
if (grabbedSticker ):
|
||||
if (grabbedStickerNode ):
|
||||
currentCursorState = CURSOR_STATE.GRABBED
|
||||
elif (hoveredSticker):
|
||||
elif (hoveredStickerNode):
|
||||
if ($GrabTimer and !($GrabTimer.is_stopped())):
|
||||
currentCursorState = CURSOR_STATE.GRABBED
|
||||
else:
|
||||
|
|
|
@ -61,7 +61,7 @@ centered = false
|
|||
offset = Vector2(-80, -190)
|
||||
|
||||
[node name="GrabTimer" type="Timer" parent="."]
|
||||
wait_time = 0.5
|
||||
wait_time = 0.3
|
||||
one_shot = true
|
||||
|
||||
[connection signal="animation_changed" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_changed"]
|
||||
|
|
|
@ -3,8 +3,7 @@ extends Sprite2D
|
|||
@export_group("Travel settings")
|
||||
@export_file("*.tscn") var NextScene:String
|
||||
@export_enum("LEFT","RIGHT","UP","DOWN") var Travel :int
|
||||
@export var Spawn_Position:Vector2 = Vector2(0,0
|
||||
)
|
||||
@export var Spawn_Position:Vector2 = Vector2(0,0) #TODO: Extrapoler la position suivante en fonction de l'enum Travel
|
||||
var NextSceneLoaded
|
||||
|
||||
func _on_area_2d_area_entered(area):
|
||||
|
|
|
@ -1,23 +1,92 @@
|
|||
extends Node
|
||||
@tool
|
||||
@icon("res://textures/stickers/icon_sticker2.svg")
|
||||
class_name Sticker extends Area2D
|
||||
## Handle all the sticker-relative gameplay.
|
||||
##
|
||||
## Sticker node expect to be a child of a Node2D, who serve as a root for
|
||||
## all the fonctionnalities. You need to assign nodes for the stickerdetection
|
||||
## and for the sprites.
|
||||
|
||||
@export_group("Nodes")
|
||||
## The look of the object. If it's multiple sprites, they should be under one main sprite
|
||||
@export var WorldSprite:Sprite2D
|
||||
## Optional - The look of the object when grabbed. If empty, OutlineMat will be applied to WorldSprite
|
||||
@export var StickerSprite:Sprite2D
|
||||
@export_group("Material")
|
||||
@export var OutlineMat:ShaderMaterial = preload("res://shaders/shaderMaterial_Outline.tres")
|
||||
@export var Foiled:bool #TODO: Foil material and logic
|
||||
|
||||
var meta:PackedStringArray = ["sticker"]
|
||||
|
||||
func _init():
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
set_meta("tags",meta)
|
||||
monitoring = false
|
||||
|
||||
func _enter_tree():
|
||||
set_meta("tags",meta)
|
||||
if (get_parent() is Sprite2D and WorldSprite == null):
|
||||
WorldSprite = get_parent()
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
if (get_parent() == get_tree().root):
|
||||
printerr("stickers should always have a parent")
|
||||
breakpoint
|
||||
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
## When the sticker is released
|
||||
func on_released(CastResult:Array=[]):
|
||||
print(self," released")
|
||||
#TODO: Need a traceresult to know if it should stay in the stickerstate or be released in the world
|
||||
get_parent().top_level = false
|
||||
get_parent().reparent(MapManager.current_scene.get_child(0))
|
||||
disable_ChildNodes_collisions(false)
|
||||
update_ChildNodes_visibilty(true)
|
||||
|
||||
|
||||
func _on_area_2d_mouse_entered():
|
||||
pass # Replace with function body.
|
||||
func on_click():
|
||||
print(self," clicked")
|
||||
|
||||
func redraw():
|
||||
if (StickerSprite != null):
|
||||
StickerSprite.queue_redraw()
|
||||
if (WorldSprite != null):
|
||||
WorldSprite.queue_redraw()
|
||||
|
||||
func on_hover():
|
||||
if (StickerSprite != null):
|
||||
WorldSprite.visible = false
|
||||
StickerSprite.visible = true
|
||||
elif (WorldSprite != null):
|
||||
WorldSprite.material = OutlineMat
|
||||
redraw()
|
||||
|
||||
|
||||
func _on_area_2d_mouse_exited():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_tree_entered():
|
||||
pass # Replace with function body.
|
||||
func on_unhover():
|
||||
if (StickerSprite != null):
|
||||
StickerSprite.visible = false
|
||||
if (WorldSprite != null):
|
||||
WorldSprite.material = null
|
||||
WorldSprite.visible = true
|
||||
redraw()
|
||||
|
||||
func on_grab(_offset:Vector2=Vector2(0.0,0.0)):
|
||||
get_parent().top_level = true
|
||||
get_parent().reparent(get_tree().root)
|
||||
update_ChildNodes_visibilty(false)
|
||||
|
||||
func update_ChildNodes_visibilty(_visible:bool=true):
|
||||
for _childNode in get_parent().get_children():
|
||||
if(_childNode != WorldSprite):
|
||||
_childNode.visible = _visible
|
||||
|
||||
func disable_ChildNodes_collisions(_disable:bool=true):
|
||||
for _childNode in get_parent().get_children():
|
||||
_childNode.set_deferred("disabled",_disable)
|
||||
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
[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"]
|
|
@ -1,3 +1,4 @@
|
|||
@tool
|
||||
extends Node
|
||||
|
||||
|
||||
|
@ -11,7 +12,7 @@ func _process(_delta):
|
|||
pass
|
||||
|
||||
func get_tags(selectedObject:Node):
|
||||
var _tags: Array
|
||||
var _tags: PackedStringArray
|
||||
if (selectedObject.has_meta("tags")):
|
||||
_tags = selectedObject.get_meta("tags")
|
||||
return _tags
|
||||
|
@ -19,19 +20,32 @@ func get_tags(selectedObject:Node):
|
|||
printerr("no tags inside %",selectedObject)
|
||||
return _tags
|
||||
|
||||
func add_tags(selectedObject:Node,tags:Array):
|
||||
var _all_tags:Array
|
||||
## Add tag on selected object by adding metadata
|
||||
func add_tag(selectedObject:Node,tag:String):
|
||||
var _all_tags:PackedStringArray
|
||||
if (selectedObject.has_meta("tags")):
|
||||
_all_tags = selectedObject.get_meta("tags")
|
||||
_all_tags.append(tags)
|
||||
if (_all_tags.find(tag) == -1):
|
||||
_all_tags.append(tag)
|
||||
else:
|
||||
_all_tags.append(tag)
|
||||
selectedObject.set_meta("tags",_all_tags)
|
||||
|
||||
func remove_tags(selectedObject:Node,tags:Array):
|
||||
func add_tags(selectedObject:Node,tags:PackedStringArray):
|
||||
var _all_tags:PackedStringArray
|
||||
if (selectedObject.has_meta("tags")):
|
||||
var _all_tags:Array
|
||||
_all_tags = selectedObject.get_meta("tags")
|
||||
for _tag in tags:
|
||||
_all_tags.erase(_tag)
|
||||
_all_tags.append_array(tags)
|
||||
selectedObject.set_meta("tags",_all_tags)
|
||||
|
||||
func remove_tags(selectedObject:Node,tags:PackedStringArray):
|
||||
if (selectedObject.has_meta("tags")):
|
||||
var _all_tags:PackedStringArray
|
||||
_all_tags = selectedObject.get_meta("tags")
|
||||
for _tag:String in tags:
|
||||
if(_all_tags.find(_tag) !=-1):
|
||||
_all_tags.remove_at(_all_tags.find(_tag))
|
||||
selectedObject.set_meta("tags",_all_tags)
|
||||
|
||||
func isSticker(selectedObject:Node):
|
||||
var _isSticker:bool = false
|
||||
|
|
|
@ -26,6 +26,7 @@ func changeSkin(NewSkin:CanvasTexture,_NewHat:CanvasTexture = null):
|
|||
Sprite.texture = CurrentHat
|
||||
|
||||
func get_input():
|
||||
#TODO: Need to freeze the player while he is traveling
|
||||
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")
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cacwy4tka88k1"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bk87x1lpjog5j" path="res://textures/atlas/Floors_05_SPRT.png" id="1_vellv"]
|
||||
[ext_resource type="Texture2D" uid="uid://bk87x1lpjog5j" path="res://textures/atlas/Floors_05_SPRT.png" id="1_gaubw"]
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_vellv")
|
||||
resource_name = "map1"
|
||||
atlas = ExtResource("1_gaubw")
|
||||
region = Rect2(0, 0, 1024, 992)
|
||||
filter_clip = true
|
||||
|
|
330
maps/map1.tscn
330
maps/map1.tscn
|
@ -1,28 +1,23 @@
|
|||
[gd_scene load_steps=33 format=3 uid="uid://wlqsvbqpcbh"]
|
||||
[gd_scene load_steps=27 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://do65rgg0p2plt" path="res://core/Door.tscn" id="4_lwk0u"]
|
||||
[ext_resource type="Texture2D" uid="uid://ddajgcwn5ip4c" path="res://textures/sprites/plants_bush1.tres" id="4_m2p3o"]
|
||||
[ext_resource type="PackedScene" uid="uid://bddcriwo55x8k" path="res://prefab/prefab_woddenbridge.tscn" id="4_okpsn"]
|
||||
[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://dggavne4ueche" path="res://extracted/Texture2D/Tree_Field_01_SPRT.png" id="7_gygvy"]
|
||||
[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"]
|
||||
[ext_resource type="Texture2D" uid="uid://b366mcexlko72" path="res://textures/atlas/LogsAndWood_All_01_SPRT.png" id="10_jr64r"]
|
||||
[ext_resource type="Texture2D" uid="uid://bwcex0o7obtg5" path="res://textures/atlas/Props_All_01_SPRT.png" id="11_0efxk"]
|
||||
[ext_resource type="Texture2D" uid="uid://ciyh3rnoo4uk" path="res://extracted/Texture2D/SimpleParticles_All_01_SPRT.png" id="12_ro7fd"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgjlblm2rpy4" path="res://textures/2d_lights_and_shadows_neutral_point_light.webp" id="13_sm1ou"]
|
||||
[ext_resource type="Texture2D" uid="uid://ciyh3rnoo4uk" path="res://textures/atlas/SimpleParticles_All_01_SPRT.png" id="6_0dctx"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgjlblm2rpy4" path="res://textures/2d_lights_and_shadows_neutral_point_light.webp" id="7_4swoj"]
|
||||
[ext_resource type="Script" path="res://core/sticker.gd" id="8_c6p5e"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnomlcslicb3k" path="res://textures/sprites/props_fire1.tres" id="10_2ugv3"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gnudx"]
|
||||
atlas = ExtResource("2_n7y5f")
|
||||
region = Rect2(252, 16, 108, 256)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ex6vq"]
|
||||
atlas = ExtResource("2_n7y5f")
|
||||
region = Rect2(0, 16, 228, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2wdar"]
|
||||
region = Rect2(384, 64, 288, 224)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_lfx7b"]
|
||||
radius = 80.0
|
||||
height = 254.0
|
||||
|
@ -32,7 +27,6 @@ radius = 70.0
|
|||
height = 512.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"]
|
||||
|
@ -40,38 +34,26 @@ radius = 65.0
|
|||
height = 184.05
|
||||
|
||||
[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)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w86nr"]
|
||||
atlas = ExtResource("10_jr64r")
|
||||
region = Rect2(544, 32, 160, 192)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tss3y"]
|
||||
size = Vector2(127.875, 25.5)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4j533"]
|
||||
atlas = ExtResource("10_jr64r")
|
||||
region = Rect2(1356, 1216, 192, 80)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2qdgk"]
|
||||
atlas = ExtResource("11_0efxk")
|
||||
region = Rect2(1824, 480, 192, 160)
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_jw3i8"]
|
||||
lifetime_randomness = 0.2
|
||||
particle_flag_disable_z = true
|
||||
|
@ -83,12 +65,15 @@ angle_max = 12.5
|
|||
gravity = Vector3(0, -20, 0)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_c24s7"]
|
||||
atlas = ExtResource("12_ro7fd")
|
||||
atlas = ExtResource("6_0dctx")
|
||||
region = Rect2(0, 0, 128, 160)
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_5wedp"]
|
||||
radius = 42.25
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_wkggp"]
|
||||
radius = 72.88
|
||||
|
||||
[node name="Map1" type="Node2D"]
|
||||
z_as_relative = false
|
||||
y_sort_enabled = true
|
||||
|
@ -144,105 +129,239 @@ visible = false
|
|||
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")]
|
||||
[node name="Bush1" type="Sprite2D" parent="."]
|
||||
position = Vector2(-2161, 1140)
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
Rotation = 1.6
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = SubResource("AtlasTexture_2wdar")
|
||||
centered = false
|
||||
offset = Vector2(-161.055, -179.785)
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Tree1" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Area2D" type="Area2D" parent="Bush1"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush1/Area2D"]
|
||||
position = Vector2(-4.46976, -71.6294)
|
||||
rotation = 1.6
|
||||
shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Tree1" type="Sprite2D" parent="."]
|
||||
position = Vector2(1592, 606)
|
||||
texture = ExtResource("7_gygvy")
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
centered = false
|
||||
offset = Vector2(-251.145, -512)
|
||||
Shape = SubResource("CapsuleShape2D_dqo8w")
|
||||
Position = Vector2(0, -253.27)
|
||||
Rotation = 0.01
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Tree2" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Area2D" type="Area2D" parent="Tree1"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tree1/Area2D"]
|
||||
position = Vector2(0, -253.27)
|
||||
rotation = 0.01
|
||||
shape = SubResource("CapsuleShape2D_dqo8w")
|
||||
|
||||
[node name="Tree2" type="Sprite2D" parent="."]
|
||||
position = Vector2(-2399, -55)
|
||||
texture = ExtResource("7_gygvy")
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
centered = false
|
||||
offset = Vector2(-251.145, -512)
|
||||
Shape = SubResource("CapsuleShape2D_dqo8w")
|
||||
Position = Vector2(0, -253.27)
|
||||
Rotation = 0.01
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Tree3" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Area2D" type="Area2D" parent="Tree2"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tree2/Area2D"]
|
||||
position = Vector2(0, -253.27)
|
||||
rotation = 0.01
|
||||
shape = SubResource("CapsuleShape2D_dqo8w")
|
||||
|
||||
[node name="Tree3" type="Sprite2D" parent="."]
|
||||
position = Vector2(-763, -2021)
|
||||
texture = ExtResource("7_gygvy")
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
centered = false
|
||||
offset = Vector2(-251.145, -512)
|
||||
Shape = SubResource("CapsuleShape2D_dqo8w")
|
||||
Position = Vector2(0, -253.27)
|
||||
Rotation = 0.01
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Tree4" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Area2D" type="Area2D" parent="Tree3"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tree3/Area2D"]
|
||||
position = Vector2(0, -253.27)
|
||||
rotation = 0.01
|
||||
shape = SubResource("CapsuleShape2D_dqo8w")
|
||||
|
||||
[node name="Tree4" type="Sprite2D" parent="."]
|
||||
position = Vector2(2365, -2258)
|
||||
texture = ExtResource("7_gygvy")
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
centered = false
|
||||
offset = Vector2(-251.145, -512)
|
||||
Shape = SubResource("CapsuleShape2D_dqo8w")
|
||||
Position = Vector2(0, -253.27)
|
||||
Rotation = 0.01
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Bush6" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Area2D" type="Area2D" parent="Tree4"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tree4/Area2D"]
|
||||
position = Vector2(0, -253.27)
|
||||
rotation = 0.01
|
||||
shape = SubResource("CapsuleShape2D_dqo8w")
|
||||
|
||||
[node name="Bush6" type="Sprite2D" parent="."]
|
||||
position = Vector2(-1556, 293)
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
Rotation = 1.6
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = ExtResource("4_m2p3o")
|
||||
centered = false
|
||||
offset = Vector2(-161.055, -179.785)
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Bush7" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Sticker" type="Area2D" parent="Bush6" node_paths=PackedStringArray("WorldSprite")]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
script = ExtResource("8_c6p5e")
|
||||
WorldSprite = NodePath("..")
|
||||
metadata/tags = PackedStringArray("sticker")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush6/Sticker"]
|
||||
position = Vector2(-4.46976, -71.6294)
|
||||
rotation = 1.6
|
||||
shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Bush7" type="Sprite2D" parent="."]
|
||||
position = Vector2(712, 293)
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
Rotation = 1.6
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = SubResource("AtlasTexture_2wdar")
|
||||
centered = false
|
||||
offset = Vector2(-161.055, -179.785)
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Bush9" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Sticker" type="Area2D" parent="Bush7" node_paths=PackedStringArray("WorldSprite")]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
script = ExtResource("8_c6p5e")
|
||||
WorldSprite = NodePath("..")
|
||||
metadata/tags = PackedStringArray("sticker")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush7/Sticker"]
|
||||
position = Vector2(-4.46976, -71.6294)
|
||||
rotation = 1.6
|
||||
shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Bush9" type="Sprite2D" parent="."]
|
||||
position = Vector2(1004, -2257)
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
Rotation = 1.6
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = SubResource("AtlasTexture_2wdar")
|
||||
centered = false
|
||||
offset = Vector2(-161.055, -179.785)
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Bush8" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Area2D" type="Area2D" parent="Bush9"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush9/Area2D"]
|
||||
position = Vector2(-4.46976, -71.6294)
|
||||
rotation = 1.6
|
||||
shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Bush8" type="Sprite2D" parent="."]
|
||||
position = Vector2(-1616, -1651)
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = SubResource("AtlasTexture_2wdar")
|
||||
centered = false
|
||||
offset = Vector2(-137.285, -179.785)
|
||||
flip_h = true
|
||||
Shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
Rotation = 1.6
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Bush10" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Area2D" type="Area2D" parent="Bush8"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush8/Area2D"]
|
||||
position = Vector2(-4.46976, -71.6294)
|
||||
rotation = 1.6
|
||||
shape = SubResource("CapsuleShape2D_lfx7b")
|
||||
|
||||
[node name="Bush10" type="Sprite2D" parent="."]
|
||||
position = Vector2(-2063, -2116)
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = SubResource("AtlasTexture_rn40i")
|
||||
centered = false
|
||||
offset = Vector2(-108.615, -141.38)
|
||||
flip_h = true
|
||||
Shape = SubResource("CapsuleShape2D_b3366")
|
||||
Position = Vector2(0, -48.95)
|
||||
Rotation = 1.5
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Bush11" parent="." instance=ExtResource("6_3fkbm")]
|
||||
[node name="Area2D" type="Area2D" parent="Bush10"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush10/Area2D"]
|
||||
position = Vector2(0, -48.95)
|
||||
rotation = 1.5
|
||||
shape = SubResource("CapsuleShape2D_b3366")
|
||||
|
||||
[node name="Bush11" type="Sprite2D" parent="."]
|
||||
position = Vector2(2208, 2337)
|
||||
scale = Vector2(5, 5.195)
|
||||
texture = SubResource("AtlasTexture_rn40i")
|
||||
centered = false
|
||||
offset = Vector2(-108.615, -141.38)
|
||||
Shape = SubResource("CapsuleShape2D_b3366")
|
||||
Position = Vector2(0, -48.95)
|
||||
Rotation = 1.5
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Rock1" parent="." instance=ExtResource("9_nxjul")]
|
||||
[node name="Area2D" type="Area2D" parent="Bush11"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bush11/Area2D"]
|
||||
position = Vector2(0, -48.95)
|
||||
rotation = 1.5
|
||||
shape = SubResource("CapsuleShape2D_b3366")
|
||||
|
||||
[node name="Rock1" type="Sprite2D" parent="."]
|
||||
position = Vector2(-1807, 2030)
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = SubResource("AtlasTexture_vun1v")
|
||||
centered = false
|
||||
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)
|
||||
metadata/tags = ["rock"]
|
||||
|
||||
[node name="Rock2" parent="." instance=ExtResource("9_nxjul")]
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Rock1"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rock1/StaticBody2D"]
|
||||
position = Vector2(7.915, -31.39)
|
||||
shape = SubResource("RectangleShape2D_4cdlc")
|
||||
debug_color = Color(0.996033, 0, 0.194446, 0.42)
|
||||
|
||||
[node name="Rock2" type="Sprite2D" parent="."]
|
||||
position = Vector2(-2248, 1895)
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = SubResource("AtlasTexture_wpoj4")
|
||||
centered = false
|
||||
offset = Vector2(-126.11, -220.56)
|
||||
StickerShape = SubResource("CapsuleShape2D_bkpsv")
|
||||
Position = Vector2(0, -89.77)
|
||||
CollisionShape = SubResource("RectangleShape2D_hk5e3")
|
||||
CollisionPosition = Vector2(0, -66.02)
|
||||
metadata/tags = ["rock"]
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Rock2"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rock2/StaticBody2D"]
|
||||
position = Vector2(0, -66.02)
|
||||
shape = SubResource("RectangleShape2D_hk5e3")
|
||||
debug_color = Color(0.996033, 0, 0.194446, 0.42)
|
||||
|
||||
[node name="Log" type="Sprite2D" parent="."]
|
||||
position = Vector2(-1043, -170)
|
||||
scale = Vector2(4, 4)
|
||||
|
@ -289,13 +408,13 @@ shape = SubResource("RectangleShape2D_tss3y")
|
|||
debug_color = Color(0.999472, 0.00663362, 0.0810784, 0.42)
|
||||
|
||||
[node name="FirePit" type="Sprite2D" parent="."]
|
||||
z_index = -1
|
||||
position = Vector2(-294, -641)
|
||||
position = Vector2(-315, -588)
|
||||
scale = Vector2(4, 4)
|
||||
texture = SubResource("AtlasTexture_2qdgk")
|
||||
texture = ExtResource("10_2ugv3")
|
||||
offset = Vector2(0, -26.64)
|
||||
|
||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="FirePit"]
|
||||
position = Vector2(-1.5, -18.25)
|
||||
position = Vector2(1.25, -45.75)
|
||||
scale = Vector2(0.5, 0.5)
|
||||
amount = 4
|
||||
process_material = SubResource("ParticleProcessMaterial_jw3i8")
|
||||
|
@ -305,25 +424,44 @@ collision_base_size = 0.0
|
|||
visibility_rect = Rect2(-160, -160, 320, 320)
|
||||
local_coords = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="FirePit"]
|
||||
visible = false
|
||||
position = Vector2(4.75, -2)
|
||||
scale = Vector2(0.7, 0.7)
|
||||
texture = SubResource("AtlasTexture_c24s7")
|
||||
centered = false
|
||||
offset = Vector2(-71.215, -125.04)
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="FirePit"]
|
||||
position = Vector2(5.25, -32)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="FirePit/StaticBody2D"]
|
||||
shape = SubResource("CircleShape2D_5wedp")
|
||||
debug_color = Color(0.937527, 0.247798, 0.087146, 0.42)
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="FirePit"]
|
||||
position = Vector2(4.75, -2)
|
||||
position = Vector2(8.25, -43)
|
||||
scale = Vector2(0.7, 0.7)
|
||||
color = Color(1, 0.54902, 0.270588, 1)
|
||||
energy = 1.2
|
||||
shadow_enabled = true
|
||||
texture = ExtResource("13_sm1ou")
|
||||
texture = ExtResource("7_4swoj")
|
||||
texture_scale = 1.9
|
||||
|
||||
[node name="Sticker" type="Area2D" parent="FirePit" node_paths=PackedStringArray("WorldSprite")]
|
||||
position = Vector2(2.75, -32)
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
script = ExtResource("8_c6p5e")
|
||||
WorldSprite = NodePath("..")
|
||||
metadata/tags = PackedStringArray("sticker")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="FirePit/Sticker"]
|
||||
shape = SubResource("CircleShape2D_wkggp")
|
||||
|
||||
[connection signal="property_list_changed" from="Bush1" to="Bush1" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Tree1" to="Tree1" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Tree2" to="Tree2" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Tree3" to="Tree3" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Tree4" to="Tree4" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Bush6" to="Bush6" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Bush7" to="Bush7" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Bush9" to="Bush9" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Bush8" to="Bush8" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Bush10" to="Bush10" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Bush11" to="Bush11" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Rock1" to="Rock1" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Rock2" to="Rock2" method="_on_property_list_changed"]
|
||||
|
|
160
maps/map2.tscn
160
maps/map2.tscn
|
@ -1,13 +1,11 @@
|
|||
[gd_scene load_steps=27 format=3 uid="uid://5tfe84u3gyty"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://5tfe84u3gyty"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bnmlngwnibfnj" path="res://extracted/ref_map2.jpg" id="1_cdv75"]
|
||||
[ext_resource type="Texture2D" uid="uid://cypb81fuw4w44" path="res://textures/atlas/GroundExtensions_All_01_SPRT.png" id="3_54rqc"]
|
||||
[ext_resource type="Texture2D" uid="uid://6hc7x8qe6r1c" path="res://maps/map2.tres" id="3_gbt28"]
|
||||
[ext_resource type="PackedScene" uid="uid://domcpxdf6lqpb" path="res://prefab/free_sticker.tscn" id="4_2tdya"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxharyv0ajr37" path="res://textures/atlas/DioramaEntrance_All_01_SPRT.png" id="4_lgnnp"]
|
||||
[ext_resource type="PackedScene" uid="uid://do65rgg0p2plt" path="res://core/Door.tscn" id="4_yvr3q"]
|
||||
[ext_resource type="Texture2D" uid="uid://dggavne4ueche" path="res://extracted/Texture2D/Tree_Field_01_SPRT.png" id="5_lwnej"]
|
||||
[ext_resource type="PackedScene" uid="uid://6ww1g2enfdx3" path="res://prefab/solid_sticker.tscn" id="6_k22qa"]
|
||||
[ext_resource type="Texture2D" uid="uid://dggavne4ueche" path="res://textures/sprites/Tree_Field_01_SPRT.png" id="5_lwnej"]
|
||||
[ext_resource type="Texture2D" uid="uid://chuv25pm2vqen" path="res://textures/atlas/Rocks_All_01_SPRT.png" id="7_pykf8"]
|
||||
[ext_resource type="Texture2D" uid="uid://b366mcexlko72" path="res://textures/atlas/LogsAndWood_All_01_SPRT.png" id="8_ugxkt"]
|
||||
|
||||
|
@ -24,22 +22,10 @@ region = Rect2(360, 288, 108, 272)
|
|||
atlas = ExtResource("4_lgnnp")
|
||||
region = Rect2(0, 16, 228, 80)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_np57i"]
|
||||
radius = 70.0
|
||||
height = 512.0
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_3r7ts"]
|
||||
radius = 80.0
|
||||
height = 254.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ti2p7"]
|
||||
atlas = ExtResource("7_pykf8")
|
||||
region = Rect2(288, 256, 192, 160)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_r6rf6"]
|
||||
radius = 65.0
|
||||
height = 184.05
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4rns6"]
|
||||
size = Vector2(133.06, 62.73)
|
||||
|
||||
|
@ -57,10 +43,6 @@ size = Vector2(65.54, 94.235)
|
|||
atlas = ExtResource("7_pykf8")
|
||||
region = Rect2(1440, 1376, 256, 256)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_io0k5"]
|
||||
radius = 105.36
|
||||
height = 291.04
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_o3kxg"]
|
||||
size = Vector2(201.89, 146.45)
|
||||
|
||||
|
@ -124,96 +106,130 @@ position = Vector2(-123, -696)
|
|||
scale = Vector2(6.39228, 6.39228)
|
||||
texture = ExtResource("1_cdv75")
|
||||
|
||||
[node name="Tree1" parent="." instance=ExtResource("4_2tdya")]
|
||||
[node name="Tree1" type="Sprite2D" parent="."]
|
||||
position = Vector2(-2084.56, -1642.1)
|
||||
scale = Vector2(3.80334, 3.95089)
|
||||
texture = ExtResource("5_lwnej")
|
||||
centered = false
|
||||
offset = Vector2(-251.145, -512)
|
||||
Shape = SubResource("CapsuleShape2D_np57i")
|
||||
Position = Vector2(0, -253.27)
|
||||
Rotation = 0.01
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Tree2" parent="." instance=ExtResource("4_2tdya")]
|
||||
[node name="Tree2" type="Sprite2D" parent="."]
|
||||
position = Vector2(-1569.56, -1870.1)
|
||||
scale = Vector2(3.2, 3.324)
|
||||
texture = ExtResource("5_lwnej")
|
||||
centered = false
|
||||
offset = Vector2(-251.145, -512)
|
||||
Shape = SubResource("CapsuleShape2D_np57i")
|
||||
Position = Vector2(0, -253.27)
|
||||
Rotation = 0.01
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Tree3" parent="." instance=ExtResource("4_2tdya")]
|
||||
[node name="Tree3" type="Sprite2D" parent="."]
|
||||
position = Vector2(2156, -1876)
|
||||
scale = Vector2(3, 3.117)
|
||||
texture = ExtResource("5_lwnej")
|
||||
centered = false
|
||||
offset = Vector2(-251.145, -512)
|
||||
Shape = SubResource("CapsuleShape2D_np57i")
|
||||
Position = Vector2(0, -253.27)
|
||||
Rotation = 0.01
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Bush1" parent="." instance=ExtResource("4_2tdya")]
|
||||
position = Vector2(-1554.56, -1581.1)
|
||||
Shape = SubResource("CapsuleShape2D_3r7ts")
|
||||
Rotation = 1.6
|
||||
|
||||
[node name="Bush2" parent="." instance=ExtResource("4_2tdya")]
|
||||
position = Vector2(-1863.56, -2052.1)
|
||||
Shape = SubResource("CapsuleShape2D_3r7ts")
|
||||
Rotation = 1.6
|
||||
|
||||
[node name="Bush3" parent="." instance=ExtResource("4_2tdya")]
|
||||
position = Vector2(2171, -1357)
|
||||
Shape = SubResource("CapsuleShape2D_3r7ts")
|
||||
Rotation = 1.6
|
||||
|
||||
[node name="Rock1" parent="." instance=ExtResource("6_k22qa")]
|
||||
[node name="Rock1" type="Sprite2D" parent="."]
|
||||
position = Vector2(2160, -900.32)
|
||||
scale = Vector2(5, 5.195)
|
||||
texture = SubResource("AtlasTexture_ti2p7")
|
||||
centered = false
|
||||
offset = Vector2(-78.385, -130.2)
|
||||
StickerShape = SubResource("CapsuleShape2D_r6rf6")
|
||||
Position = Vector2(8.56, -52.395)
|
||||
CollisionShape = SubResource("RectangleShape2D_4rns6")
|
||||
CollisionPosition = Vector2(7.915, -31.39)
|
||||
metadata/tags = ["rock"]
|
||||
|
||||
[node name="Box1" parent="." instance=ExtResource("6_k22qa")]
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Rock1"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rock1/StaticBody2D"]
|
||||
position = Vector2(7.915, -31.39)
|
||||
shape = SubResource("RectangleShape2D_4rns6")
|
||||
debug_color = Color(0.996033, 0, 0.194446, 0.42)
|
||||
|
||||
[node name="Box1" type="Sprite2D" parent="."]
|
||||
position = Vector2(1195, -898.32)
|
||||
scale = Vector2(5, 4.51)
|
||||
texture = SubResource("AtlasTexture_4pwyl")
|
||||
centered = false
|
||||
offset = Vector2(-52.525, -167.375)
|
||||
StickerShape = SubResource("RectangleShape2D_djose")
|
||||
Position = Vector2(0, -76.12)
|
||||
CollisionShape = SubResource("RectangleShape2D_enbs7")
|
||||
CollisionPosition = Vector2(0, -49.595)
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Box2" parent="." instance=ExtResource("6_k22qa")]
|
||||
[node name="Area2D" type="Area2D" parent="Box1"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="StickerShape2D" type="CollisionShape2D" parent="Box1/Area2D"]
|
||||
position = Vector2(0, -76.12)
|
||||
rotation = 1.5708
|
||||
shape = SubResource("RectangleShape2D_djose")
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Box1"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Box1/StaticBody2D"]
|
||||
position = Vector2(0, -49.595)
|
||||
shape = SubResource("RectangleShape2D_enbs7")
|
||||
debug_color = Color(0.996033, 0, 0.194446, 0.42)
|
||||
|
||||
[node name="Box2" type="Sprite2D" parent="."]
|
||||
position = Vector2(1437, -1275.32)
|
||||
scale = Vector2(5, 4.51)
|
||||
texture = SubResource("AtlasTexture_4pwyl")
|
||||
centered = false
|
||||
offset = Vector2(-54.04, -167.375)
|
||||
StickerShape = SubResource("RectangleShape2D_djose")
|
||||
Position = Vector2(0, -76.12)
|
||||
CollisionShape = SubResource("RectangleShape2D_enbs7")
|
||||
CollisionPosition = Vector2(0, -49.595)
|
||||
metadata/tags = ["sticker"]
|
||||
|
||||
[node name="Rock2" parent="." instance=ExtResource("6_k22qa")]
|
||||
[node name="Area2D" type="Area2D" parent="Box2"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
monitoring = false
|
||||
|
||||
[node name="StickerShape2D" type="CollisionShape2D" parent="Box2/Area2D"]
|
||||
position = Vector2(0, -76.12)
|
||||
rotation = 1.5708
|
||||
shape = SubResource("RectangleShape2D_djose")
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Box2"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Box2/StaticBody2D"]
|
||||
position = Vector2(0, -49.595)
|
||||
shape = SubResource("RectangleShape2D_enbs7")
|
||||
debug_color = Color(0.996033, 0, 0.194446, 0.42)
|
||||
|
||||
[node name="Rock2" type="Sprite2D" parent="."]
|
||||
position = Vector2(1776, -705.32)
|
||||
scale = Vector2(5, 5.195)
|
||||
texture = SubResource("AtlasTexture_ddtk8")
|
||||
centered = false
|
||||
offset = Vector2(-126.11, -220.56)
|
||||
StickerShape = SubResource("CapsuleShape2D_io0k5")
|
||||
Position = Vector2(0, -89.77)
|
||||
CollisionShape = SubResource("RectangleShape2D_o3kxg")
|
||||
CollisionPosition = Vector2(0, -66.02)
|
||||
metadata/tags = ["rock"]
|
||||
|
||||
[node name="Rock3" parent="." instance=ExtResource("6_k22qa")]
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Rock2"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rock2/StaticBody2D"]
|
||||
position = Vector2(0, -66.02)
|
||||
shape = SubResource("RectangleShape2D_o3kxg")
|
||||
debug_color = Color(0.996033, 0, 0.194446, 0.42)
|
||||
|
||||
[node name="Rock3" type="Sprite2D" parent="."]
|
||||
position = Vector2(-993, -2293)
|
||||
scale = Vector2(4.97891, 4.95232)
|
||||
texture = SubResource("AtlasTexture_ko6cw")
|
||||
centered = false
|
||||
offset = Vector2(-208.35, -260.555)
|
||||
StickerShape = SubResource("CapsuleShape2D_io0k5")
|
||||
Position = Vector2(0, -123.545)
|
||||
CollisionShape = SubResource("RectangleShape2D_ontns")
|
||||
CollisionPosition = Vector2(0, -65.23)
|
||||
metadata/tags = ["rock"]
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Rock3"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Rock3/StaticBody2D"]
|
||||
position = Vector2(0, -65.23)
|
||||
shape = SubResource("RectangleShape2D_ontns")
|
||||
debug_color = Color(0.996033, 0, 0.194446, 0.42)
|
||||
|
||||
[connection signal="property_list_changed" from="Tree1" to="Tree1" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Tree2" to="Tree2" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Tree3" to="Tree3" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Rock1" to="Rock1" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Box1" to="Box1" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Box2" to="Box2" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Rock2" to="Rock2" method="_on_property_list_changed"]
|
||||
[connection signal="property_list_changed" from="Rock3" to="Rock3" method="_on_property_list_changed"]
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
[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
|
||||
|
||||
var OutlineMat:ShaderMaterial = preload(\"res://shaders/shaderMaterial_Outline.tres\")
|
||||
|
||||
@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 :float:
|
||||
set(new_rotation):
|
||||
Rotation = new_rotation
|
||||
$Area2D/CollisionShape2D.rotation = Rotation
|
||||
$Area2D/CollisionShape2D.queue_redraw()
|
||||
|
||||
|
||||
func on_released():
|
||||
print(self,\" released\")
|
||||
|
||||
func on_click():
|
||||
print(self,\" clicked\")
|
||||
|
||||
func on_hover():
|
||||
material = OutlineMat
|
||||
queue_redraw()
|
||||
|
||||
func on_unhover():
|
||||
material = null
|
||||
queue_redraw()
|
||||
|
||||
func on_grab(_offset:Vector2=Vector2(0.0,0.0)):
|
||||
pass
|
||||
"
|
||||
|
||||
[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"]
|
|
@ -1,10 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bddcriwo55x8k"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bddcriwo55x8k"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b366mcexlko72" path="res://textures/atlas/LogsAndWood_All_01_SPRT.png" id="1_lvitw"]
|
||||
[ext_resource type="PackedScene" uid="uid://clqvgh6qmglue" path="res://core/bridgeNode.tscn" id="2_te8ug"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nkyhf"]
|
||||
atlas = ExtResource("1_lvitw")
|
||||
region = Rect2(72, 1392, 216, 272)
|
||||
|
||||
[node name="WoodenBridge" type="Sprite2D"]
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
[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
|
||||
var OutlineMat:ShaderMaterial = preload(\"res://shaders/shaderMaterial_Outline.tres\")
|
||||
|
||||
@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 :float:
|
||||
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()
|
||||
|
||||
func on_released():
|
||||
print(self,\" released\")
|
||||
|
||||
func on_click():
|
||||
print(self,\" clicked\")
|
||||
|
||||
func on_hover():
|
||||
material = OutlineMat
|
||||
queue_redraw()
|
||||
|
||||
func on_unhover():
|
||||
material = null
|
||||
queue_redraw()
|
||||
|
||||
func on_grab(_offset:Vector2=Vector2(0.0,0.0)):
|
||||
pass
|
||||
"
|
||||
|
||||
[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")
|
||||
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)
|
||||
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"]
|
1
textures/stickers/icon_sticker2.svg
Normal file
1
textures/stickers/icon_sticker2.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="16" height="16"><style>.a{fill:#8da5f3}.b{fill:#515d88}</style><path fill-rule="evenodd" class="a" d="m44 4c2.1 0 4.2 0.4 6.1 1.2 2 0.8 3.7 2 5.2 3.5 1.5 1.5 2.7 3.2 3.5 5.2 0.8 1.9 1.2 4 1.2 6.1v9l-8.8 9.4c0.5-0.7 0.8-1.5 0.8-2.4v-8c0-1.1-0.4-2.1-1.2-2.8-0.7-0.8-1.7-1.2-2.8-1.2-1.1 0-2.1 0.4-2.8 1.2-0.8 0.7-1.2 1.7-1.2 2.8v8c0 1.1 0.4 2.1 1.2 2.8 0.7 0.8 1.7 1.2 2.8 1.2 1 0 1.9-0.4 2.6-1l-19.6 21h-11c-2.1 0-4.2-0.4-6.1-1.2-2-0.8-3.7-2-5.2-3.5-1.5-1.5-2.7-3.2-3.5-5.2-0.8-1.9-1.2-4-1.2-6.1v-24c0-2.1 0.4-4.2 1.2-6.1 0.8-2 2-3.7 3.5-5.2 1.5-1.5 3.2-2.7 5.2-3.5 1.9-0.8 4-1.2 6.1-1.2zm-32 32c0 1.1 0.4 2.1 1.2 2.8 0.7 0.8 1.7 1.2 2.8 1.2 1.1 0 2.1-0.4 2.8-1.2 0.8-0.7 1.2-1.7 1.2-2.8v-8c0-1.1-0.4-2.1-1.2-2.8-0.7-0.8-1.7-1.2-2.8-1.2-1.1 0-2.1 0.4-2.8 1.2-0.8 0.7-1.2 1.7-1.2 2.8zm38.6 3l0.6-0.6q-0.2 0.2-0.4 0.4-0.1 0.1-0.2 0.2zm-7.3 6.7c-0.8-0.7-1.8-1.2-2.8-1.2-1.1 0-2.1 0.4-2.8 1.2q-1.2 1.1-2.6 1.7-1.5 0.6-3.1 0.6-1.6 0-3.1-0.6-1.4-0.6-2.6-1.7c-0.7-0.8-1.7-1.2-2.8-1.2-1 0-2 0.5-2.8 1.2-0.7 0.7-1.1 1.7-1.1 2.8 0 1 0.4 2.1 1.1 2.8 1.5 1.5 3.2 2.7 5.2 3.5 1.9 0.8 4 1.2 6.1 1.2 2.1 0 12-9.6 11.3-10.3z"/><path class="b" d="m60.1 26.4c0 0-26.2-6.4-32.1 0.8-5.5 6.5-5.2 33.1-5.2 33.1l8.6-0.6 27.4-29z"/></svg>
|
After Width: | Height: | Size: 1.3 KiB |
37
textures/stickers/icon_sticker2.svg.import
Normal file
37
textures/stickers/icon_sticker2.svg.import
Normal file
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bc22tbocdun87"
|
||||
path="res://.godot/imported/icon_sticker2.svg-a942a9bf0ad4999d3046be6cf284193c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://textures/stickers/icon_sticker2.svg"
|
||||
dest_files=["res://.godot/imported/icon_sticker2.svg-a942a9bf0ad4999d3046be6cf284193c.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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
Loading…
Reference in a new issue