breaking: changing card to become Area2D

This commit is contained in:
betalars 2023-06-28 02:25:13 +02:00
parent a6cd800f11
commit 9b617f2a3c
2 changed files with 13 additions and 17 deletions

View File

@ -1,6 +1,6 @@
@tool
extends Control
extends Area2D
class_name Card
var compatible_postits: Array[PostIt] = []
var own_postits: Array[PostIt] = []

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=3 uid="uid://dy5rd437h5hsw"]
[gd_scene load_steps=21 format=3 uid="uid://dy5rd437h5hsw"]
[ext_resource type="Script" path="res://logic-scenes/board/card.gd" id="1_emip0"]
[ext_resource type="Texture2D" uid="uid://sv0nhkkur1tt" path="res://logic-scenes/board/card-textures/cardsheet.png" id="2_ioijn"]
@ -141,23 +141,19 @@ func _process(_delta):
self.visible = State.reduce_motion and is_void
"
[node name="card" type="Control"]
custom_minimum_size = Vector2(310, 210)
layout_mode = 3
anchors_preset = 0
offset_left = -150.0
offset_top = -110.0
offset_right = 160.0
offset_bottom = 100.0
focus_mode = 2
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_foovg"]
radius = 110.0
height = 336.0
[node name="card" type="Area2D"]
rotation = 0.197177
script = ExtResource("1_emip0")
[node name="BackgroundSprite" type="AnimatedSprite2D" parent="."]
clip_children = 2
position = Vector2(150, 110)
scale = Vector2(0.6, 0.6)
sprite_frames = SubResource("SpriteFrames_ckivt")
frame = 4
frame = 3
script = SubResource("GDScript_8bs16")
[node name="GPUParticles2D" type="GPUParticles2D" parent="BackgroundSprite"]
@ -179,7 +175,6 @@ texture = ExtResource("4_fwm1k")
script = SubResource("GDScript_tgc0b")
[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@ -196,12 +191,13 @@ theme_type_variation = &"card_text"
autowrap_mode = 3
[node name="postit anchor" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_left = 100.0
offset_top = 148.0
offset_right = 140.0
offset_bottom = 188.0
[connection signal="focus_entered" from="." to="." method="_on_focus_entered"]
[connection signal="focus_exited" from="." to="." method="_on_focus_exited"]
[connection signal="focus_entered" from="postit anchor" to="." method="_on_postit_anchor_focus_entered"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708
shape = SubResource("CapsuleShape2D_foovg")