Select/hover tetramino with Area3D signal
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://j3vihw63lw7q"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://j3vihw63lw7q"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvxt8mmibr1uj" path="res://scripts/board_manager.gd" id="1_jnyf0"]
|
||||
[ext_resource type="PackedScene" uid="uid://btdnshtrnejt" path="res://scenes/board/tetromino.tscn" id="2_jnyf0"]
|
||||
[ext_resource type="Script" uid="uid://bv7xi75mklk7d" path="res://scripts/tetromino_selector.gd" id="3_jnyf0"]
|
||||
[ext_resource type="Resource" uid="uid://cqgsjnof4dly0" path="res://resources/data/tetrominos/t_piece.tres" id="3_q07he"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_s78fa"]
|
||||
size = Vector2(1, 1)
|
||||
@@ -25,6 +26,7 @@ mesh = SubResource("PlaneMesh_s78fa")
|
||||
[node name="TetrominoContainer" type="Node3D" parent="."]
|
||||
|
||||
[node name="Tetromino" parent="TetrominoContainer" instance=ExtResource("2_jnyf0")]
|
||||
resource = ExtResource("3_q07he")
|
||||
|
||||
[node name="TetrominoSelector" type="Node3D" parent="."]
|
||||
script = ExtResource("3_jnyf0")
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://btdnshtrnejt"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://btdnshtrnejt"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c8041v2usigk4" path="res://scripts/tetromino.gd" id="1_hprdj"]
|
||||
[ext_resource type="Resource" uid="uid://curn7voye0ewx" path="res://resources/data/tetrominos/i_piece.tres" id="2_f3wyc"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://e1oj3t6audj3" path="res://assets/models/MSH_1x3.res" id="3_f3wyc"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_f3wyc"]
|
||||
albedo_color = Color(1, 0, 0, 1)
|
||||
[ext_resource type="ArrayMesh" uid="uid://5jb2cluw5746" path="res://assets/models/MSH_T_Corta.res" id="3_f3wyc"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_f3wyc"]
|
||||
size = Vector3(3.0031738, 1, 1)
|
||||
|
||||
[node name="Tetromino" type="Node3D"]
|
||||
script = ExtResource("1_hprdj")
|
||||
@@ -19,7 +15,6 @@ mesh_color = Color(1, 0, 0, 1)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Visuals"]
|
||||
layers = 2
|
||||
material_override = SubResource("StandardMaterial3D_f3wyc")
|
||||
mesh = ExtResource("3_f3wyc")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
@@ -28,5 +23,8 @@ collision_layer = 16
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="SelectionArea"]
|
||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -1.6541168e-10, 0.49949223, -0.0037841797)
|
||||
shape = SubResource("BoxShape3D_f3wyc")
|
||||
|
||||
[connection signal="input_event" from="SelectionArea" to="." method="_on_selection_area_input_event"]
|
||||
[connection signal="mouse_entered" from="SelectionArea" to="." method="_on_selection_area_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="SelectionArea" to="." method="_on_selection_area_mouse_exited"]
|
||||
|
||||
Reference in New Issue
Block a user