ja
This commit is contained in:
@@ -8,6 +8,21 @@ size = Vector3(1.5, 3, 0.2)
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_pejvk"]
|
||||
size = Vector3(1.5, 3, 0.2)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_hlq2m"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_53g2p"]
|
||||
resource_name = "open"
|
||||
length = 0.5
|
||||
@@ -24,21 +39,6 @@ tracks/0/keys = {
|
||||
"values": [Vector3(0, 0, 0), Vector3(1.4, 0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_hlq2m"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_r8evj"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_hlq2m"),
|
||||
|
@@ -14,3 +14,6 @@ func complete():
|
||||
uncompleted -= 1
|
||||
if uncompleted == 0:
|
||||
unlock.emit()
|
||||
|
||||
func uncomplete():
|
||||
pass #TODO
|
||||
|
@@ -3,3 +3,5 @@ extends Node3D
|
||||
@onready var anim: AnimationPlayer = $AnimationPlayer
|
||||
|
||||
func open(): anim.play("open")
|
||||
|
||||
func close(): anim.play_backwards("open")
|
||||
|
@@ -4,4 +4,4 @@ extends Completer
|
||||
|
||||
func _on_interaction_area_interacted():
|
||||
animation_player.play("press")
|
||||
completed.emit()
|
||||
super.toggle_complete()
|
||||
|
@@ -1,4 +1,16 @@
|
||||
extends Node
|
||||
class_name Completer
|
||||
|
||||
@export var one_shot: bool
|
||||
|
||||
signal completed
|
||||
signal uncompleted
|
||||
|
||||
var toggle: bool = true
|
||||
|
||||
func toggle_complete():
|
||||
toggle = !toggle
|
||||
if one_shot || toggle:
|
||||
completed.emit()
|
||||
else:
|
||||
uncompleted.emit()
|
||||
|
Reference in New Issue
Block a user