Created a Generator Panel with Key and Shape keyed the button being pressed and made it animate when clicked in game
This commit is contained in:
58
Assets/Objects/generator_panel.tscn
Normal file
58
Assets/Objects/generator_panel.tscn
Normal file
@ -0,0 +1,58 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://bpc015tk4ehtg"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/scripts/Generator Panel.gd" id="1_i8xx2"]
|
||||
[ext_resource type="PackedScene" uid="uid://r4bpij06p34a" path="res://Blender Files/Objects/GeneratorPanel.blend" id="2_4k7uo"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xn70b"]
|
||||
size = Vector3(0.322693, 0.569824, 0.078186)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_5a75i"]
|
||||
resource_name = "Press"
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("GeneratorPanel/Circle:blend_shapes/ButtonPressed")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.5, 1)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_qkow4"]
|
||||
length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("GeneratorPanel/Circle:blend_shapes/ButtonPressed")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ed3dm"]
|
||||
_data = {
|
||||
"Press": SubResource("Animation_5a75i"),
|
||||
"RESET": SubResource("Animation_qkow4")
|
||||
}
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D"]
|
||||
script = ExtResource("1_i8xx2")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000640869, 0.0495605, 0.0411072)
|
||||
shape = SubResource("BoxShape3D_xn70b")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_ed3dm")
|
||||
}
|
||||
|
||||
[node name="GeneratorPanel" parent="." instance=ExtResource("2_4k7uo")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.0453592)
|
||||
|
||||
[editable path="GeneratorPanel"]
|
||||
Reference in New Issue
Block a user