Compare commits
No commits in common. "b5a4bd2896e2eca91f85cdae35fc50f3df914d9c" and "80eb4a727fdf08345348bc50a4c499a6f5f6d84a" have entirely different histories.
b5a4bd2896
...
80eb4a727f
|
|
@ -29,8 +29,6 @@ func get_ready():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func play() -> String:
|
func play() -> String:
|
||||||
for i in range(20):
|
|
||||||
await get_tree().process_frame
|
|
||||||
await get_ready()
|
await get_ready()
|
||||||
await start_room()
|
await start_room()
|
||||||
var next_room : StringName = await proceed
|
var next_room : StringName = await proceed
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -16,6 +16,9 @@ func _ready():
|
||||||
elif item is StickyNote:
|
elif item is StickyNote:
|
||||||
spawn_sticky_note((item as StickyNote).duplicate())
|
spawn_sticky_note((item as StickyNote).duplicate())
|
||||||
|
|
||||||
|
func _process(delta: float):
|
||||||
|
pass
|
||||||
|
|
||||||
func spawn_card(card: Card):
|
func spawn_card(card: Card):
|
||||||
$cards.add_child(card)
|
$cards.add_child(card)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,10 @@ func _navigate_prev():
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
print("CardBoard.gd: %s._ready()" % self.name)
|
print("CardBoard.gd: %s._ready()" % self.name)
|
||||||
super._ready()
|
super._ready()
|
||||||
|
# HACK: Lets us debug more easily
|
||||||
|
if get_parent() == get_tree().root:
|
||||||
|
_debug_mode()
|
||||||
|
return
|
||||||
|
|
||||||
print("Board Ready!", self, "room", State.room)
|
print("Board Ready!", self, "room", State.room)
|
||||||
State.room.card_board = self
|
State.room.card_board = self
|
||||||
|
|
@ -105,7 +109,6 @@ func _process(delta: float):
|
||||||
else:
|
else:
|
||||||
# do adjustment with FIR filter
|
# do adjustment with FIR filter
|
||||||
note.position = _smooth(note.position, note.home, delta)
|
note.position = _smooth(note.position, note.home, delta)
|
||||||
note.z_index = 0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
extends Draggable
|
extends Draggable
|
||||||
class_name Card
|
class_name Card
|
||||||
|
|
||||||
var card_id : StringName
|
var card_id
|
||||||
|
|
||||||
enum burned {
|
enum burned {
|
||||||
NOT,
|
NOT,
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,6 @@ var tween : Tween = null
|
||||||
|
|
||||||
|
|
||||||
func animate_home() -> void:
|
func animate_home() -> void:
|
||||||
z_index = 50
|
|
||||||
if tween: tween.kill()
|
if tween: tween.kill()
|
||||||
tween = create_tween().set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_QUART)
|
tween = create_tween().set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_QUART)
|
||||||
tween.tween_property(self, "position", home, 0.5)
|
tween.tween_property(self, "position", home, 0.5)
|
||||||
|
|
@ -115,7 +114,6 @@ func start_drag(mouse_offset: Vector2) -> void:
|
||||||
_drag_start_position = global_position
|
_drag_start_position = global_position
|
||||||
_mouse_drag_offset = mouse_offset
|
_mouse_drag_offset = mouse_offset
|
||||||
_drag_source = get_parent()
|
_drag_source = get_parent()
|
||||||
z_index = 60
|
|
||||||
is_dragged = true
|
is_dragged = true
|
||||||
|
|
||||||
## Updates position during drag (call from _process or manual update)
|
## Updates position during drag (call from _process or manual update)
|
||||||
|
|
@ -132,7 +130,6 @@ func find_drop_target() -> Node:
|
||||||
|
|
||||||
## End drag operation and return the node we want to be accepted by (if any)
|
## End drag operation and return the node we want to be accepted by (if any)
|
||||||
func end_drag() -> Node:
|
func end_drag() -> Node:
|
||||||
z_index = 0
|
|
||||||
is_dragged = false
|
is_dragged = false
|
||||||
_drag_source = null
|
_drag_source = null
|
||||||
return null
|
return null
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,6 @@ layout_mode = 2
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
|
||||||
[node name="instructions_panel" type="PanelContainer" parent="."]
|
[node name="instructions_panel" type="PanelContainer" parent="."]
|
||||||
z_index = 100
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ extends Draggable
|
||||||
class_name StickyNote
|
class_name StickyNote
|
||||||
|
|
||||||
var sticky_id
|
var sticky_id
|
||||||
var parent_id : StringName
|
var parent_id
|
||||||
|
|
||||||
var sibling: StickyNote
|
var sibling: StickyNote
|
||||||
var shift_tween: Tween
|
var shift_tween: Tween
|
||||||
|
|
|
||||||
|
|
@ -230,3 +230,4 @@ func pick_cards(id: Scenes.id):
|
||||||
|
|
||||||
await cards_picked
|
await cards_picked
|
||||||
hide()
|
hide()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,6 @@ var tween: Tween = null
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
assert(note and frame and canvas_layer, "Interactable must have views and frame attached")
|
assert(note and frame and canvas_layer, "Interactable must have views and frame attached")
|
||||||
|
|
||||||
if interaction:
|
|
||||||
playable = interaction.instantiate() as Control
|
|
||||||
canvas_layer.add_child(playable)
|
|
||||||
|
|
||||||
view.scale = Vector3.ZERO
|
view.scale = Vector3.ZERO
|
||||||
frame.modulate.a = 0.0
|
frame.modulate.a = 0.0
|
||||||
light.visible = false
|
light.visible = false
|
||||||
|
|
@ -44,6 +39,9 @@ func _ready() -> void:
|
||||||
|
|
||||||
## To be called by room
|
## To be called by room
|
||||||
func pull_save_state() -> void:
|
func pull_save_state() -> void:
|
||||||
|
if interaction:
|
||||||
|
playable = interaction.instantiate() as Control
|
||||||
|
canvas_layer.add_child(playable)
|
||||||
_update_caption()
|
_update_caption()
|
||||||
# Check if this scene was already completed (for re-entering rooms)
|
# Check if this scene was already completed (for re-entering rooms)
|
||||||
if playable is StoryPlayable:
|
if playable is StoryPlayable:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
extends Control
|
extends Control
|
||||||
class_name Playable
|
class_name Playable
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
hide()
|
hide()
|
||||||
|
if not Main.normal_boot:
|
||||||
|
play.call_deferred()
|
||||||
|
|
||||||
|
|
||||||
## Awaitable that encapsulates the core interaction with this Playable
|
## Awaitable that encapsulates the core interaction with this Playable
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue