summaryrefslogtreecommitdiffstats
path: root/cinematics
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-02-05 22:02:42 +0200
committerJan Tuomi <jan@jantuomi.fi>2026-02-05 23:11:06 +0200
commit8967f6bb6e8ecb3b5b4073424692ce0ddfec61cb (patch)
tree5961c0b5226d077c6b1e97c02c1f5fcc1d6a729f /cinematics
parentf53d1d99707c5063a35c0c68890e0947077108ad (diff)
Rework cinematicsHEADmain
Diffstat (limited to 'cinematics')
-rw-r--r--cinematics/intro.gd49
-rw-r--r--cinematics/intro.gd.uid1
-rw-r--r--cinematics/relic_get.gd26
-rw-r--r--cinematics/relic_get.gd.uid1
-rw-r--r--cinematics/test1.gd15
-rw-r--r--cinematics/test1.gd.uid1
6 files changed, 93 insertions, 0 deletions
diff --git a/cinematics/intro.gd b/cinematics/intro.gd
new file mode 100644
index 0000000..2549088
--- /dev/null
+++ b/cinematics/intro.gd
@@ -0,0 +1,49 @@
+class_name CineIntro
+extends Cinematic
+
+func _ready():
+ await top.get_transition_player().transition_finished
+
+ var ap: AnimationPlayer = top.get_active_room().get_node("AnimationPlayer")
+
+ ap.play("cine_intro")
+ top.play_cine_bars()
+
+ await ap.animation_finished
+
+ top.get_transition_player().room_transition(
+ null, "res://rooms/ship1.tscn", null,
+ func (_player): pass)
+
+ await ship1()
+
+ queue_free()
+
+func ship1():
+ await top.get_transition_player().room_changed
+ var room = top.get_active_room()
+
+ var player: Player = room.get_node("Player")
+ var captain: Node2D = room.get_node("Captain")
+ var crew1: Node2D = room.get_node("Crew1")
+ var crew2: Node2D = room.get_node("Crew2")
+
+ player.remove_from_group("camera_target")
+
+ await top.get_transition_player().transition_finished
+
+ await say(captain, "Crew!")
+
+ player.velocity.x = -1 # flip
+ crew1.flip_h = true
+ crew2.flip_h = true
+
+ await get_tree().create_timer(1.0).timeout
+
+ await say(captain, "The Frogcorp Scientific Excursion commences today!")
+ await say(captain, "TODO")
+
+ await top.clear_cine_bars()
+
+ player.request_state_normal()
+ player.add_to_group("camera_target")
diff --git a/cinematics/intro.gd.uid b/cinematics/intro.gd.uid
new file mode 100644
index 0000000..a39d2f1
--- /dev/null
+++ b/cinematics/intro.gd.uid
@@ -0,0 +1 @@
+uid://c1brkwqi07uem
diff --git a/cinematics/relic_get.gd b/cinematics/relic_get.gd
new file mode 100644
index 0000000..40d3b9f
--- /dev/null
+++ b/cinematics/relic_get.gd
@@ -0,0 +1,26 @@
+class_name CineRelicGet
+extends Cinematic
+
+var r: Node2D
+
+func _init(relic: Node2D):
+ r = relic
+
+func _ready():
+ var player: Player = get_room_node("Player")
+ var mp: AudioStreamPlayer = top.get_node("MusicPlayer")
+ mp.stream_paused = true
+ player.request_play_fanfare_sfx()
+
+ get_tree().paused = true
+
+ await top.play_cine_bars()
+ await say(r, "You found a mysterious relic!")
+ await top.clear_cine_bars()
+
+ r.queue_free()
+ get_tree().paused = false
+
+ mp.stream_paused = false
+
+ queue_free()
diff --git a/cinematics/relic_get.gd.uid b/cinematics/relic_get.gd.uid
new file mode 100644
index 0000000..c5ed07a
--- /dev/null
+++ b/cinematics/relic_get.gd.uid
@@ -0,0 +1 @@
+uid://j0vbra41omei
diff --git a/cinematics/test1.gd b/cinematics/test1.gd
new file mode 100644
index 0000000..9ef48b7
--- /dev/null
+++ b/cinematics/test1.gd
@@ -0,0 +1,15 @@
+class_name CinematicTest1
+extends Cinematic
+
+func _ready():
+ var player: Player = get_room_node("Player")
+ var npc: Node2D = get_room_node("CinematicTestNPC")
+ player.request_state_forced("DROP")
+
+ await say(player, "hello")
+ await say(npc, "well hi")
+ var answer = await ask(npc, "buy or sell?", ["buy", "sell"])
+ await say(npc, "it's %s time" % answer)
+
+ player.request_state_normal()
+ print("dialogue done, answer %s" % answer)
diff --git a/cinematics/test1.gd.uid b/cinematics/test1.gd.uid
new file mode 100644
index 0000000..57573c2
--- /dev/null
+++ b/cinematics/test1.gd.uid
@@ -0,0 +1 @@
+uid://23xqfts2fuwx