2024-07-26 09:50:52 +00:00
|
|
|
[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
|
|
|
|
|
2024-07-28 12:04:20 +00:00
|
|
|
var OutlineMat:ShaderMaterial = preload(\"res://shaders/shaderMaterial_Outline.tres\")
|
|
|
|
|
2024-07-26 10:21:57 +00:00
|
|
|
@export_group(\"Sticker Detection Shape\")
|
2024-07-26 09:50:52 +00:00
|
|
|
@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()
|
2024-07-26 14:22:33 +00:00
|
|
|
@export var Rotation :float:
|
2024-07-26 09:50:52 +00:00
|
|
|
set(new_rotation):
|
|
|
|
Rotation = new_rotation
|
|
|
|
$Area2D/CollisionShape2D.rotation = Rotation
|
|
|
|
$Area2D/CollisionShape2D.queue_redraw()
|
2024-07-26 10:21:57 +00:00
|
|
|
|
2024-07-27 14:30:15 +00:00
|
|
|
|
|
|
|
func on_released():
|
|
|
|
print(self,\" released\")
|
2024-07-27 15:04:27 +00:00
|
|
|
|
|
|
|
func on_click():
|
|
|
|
print(self,\" clicked\")
|
|
|
|
|
|
|
|
func on_hover():
|
|
|
|
material = OutlineMat
|
|
|
|
queue_redraw()
|
|
|
|
|
|
|
|
func on_unhover():
|
|
|
|
material = null
|
|
|
|
queue_redraw()
|
2024-07-28 20:49:46 +00:00
|
|
|
|
|
|
|
func on_grab(_offset:Vector2=Vector2(0.0,0.0)):
|
|
|
|
pass
|
2024-07-26 09:50:52 +00:00
|
|
|
"
|
|
|
|
|
2024-07-26 10:21:57 +00:00
|
|
|
[node name="FreeSticker1" type="Sprite2D"]
|
2024-07-26 09:50:52 +00:00
|
|
|
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="."]
|
2024-07-26 10:21:57 +00:00
|
|
|
collision_layer = 2
|
|
|
|
collision_mask = 0
|
2024-07-26 09:50:52 +00:00
|
|
|
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"]
|