feat: beginning integration trainstation, again...
This commit is contained in:
parent
3c5bab0753
commit
3930af251c
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
extends Node3D
|
||||
|
||||
@export var door_open: bool:
|
||||
set(open):
|
||||
|
||||
if is_node_ready() and door_open != open:
|
||||
if open:
|
||||
$AnimationPlayer.play("door_open")
|
||||
else:
|
||||
$AnimationPlayer.play("door_close")
|
||||
door_open=open
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cyohujvfoiof7
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
extends Node2D
|
||||
|
||||
@export var current_station: Scenes.id = Scenes.id.ADULT_DND:
|
||||
set(station):
|
||||
current_station=station
|
||||
if is_node_ready():
|
||||
match station:
|
||||
Scenes.id.ADULT_DND:
|
||||
%AnimationPlayer.play("hirschfeld")
|
||||
Scenes.id.ADULT_VOLUNTARY:
|
||||
%AnimationPlayer.play("parity")
|
||||
Scenes.id.ADULT_CHRISTMAS:
|
||||
%AnimationPlayer.play("saint-exupery")
|
||||
Scenes.id.ADULT_EATING:
|
||||
%AnimationPlayer.play("refectory")
|
||||
Scenes.id.ADULT_UNI:
|
||||
%AnimationPlayer.play("university")
|
||||
Scenes.id.ADULT_THERAPY:
|
||||
%AnimationPlayer.play("rosenthal")
|
||||
Scenes.id.ADULT_BURNOUT:
|
||||
%AnimationPlayer.play()
|
||||
_:
|
||||
%AnimationPlayer.play("hirschfeld")
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://hbbwgwy2wxwe
|
||||
|
|
@ -1,35 +1,9 @@
|
|||
[gd_scene load_steps=18 format=3 uid="uid://bk1l1a7eae838"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dg881upy6686k" path="res://base-environments/transition/misc/subway_map.png" id="1_p8tnj"]
|
||||
[ext_resource type="Script" uid="uid://hbbwgwy2wxwe" path="res://base-environments/transition/misc/subway_map.gd" id="1_to33c"]
|
||||
[ext_resource type="FontFile" uid="uid://bdkb43smt08c0" path="res://import/fonts/Ubuntu-B.ttf" id="2_q6nhe"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_80ahk"]
|
||||
script/source = "
|
||||
extends Node2D
|
||||
|
||||
@export var current_station: Scenes.id = Scenes.id.ADULT_DND:
|
||||
set(station):
|
||||
current_station=station
|
||||
if is_node_ready():
|
||||
match station:
|
||||
Scenes.id.ADULT_DND:
|
||||
%AnimationPlayer.play(\"hirschfeld\")
|
||||
Scenes.id.ADULT_VOLUNTARY:
|
||||
%AnimationPlayer.play(\"parity\")
|
||||
Scenes.id.ADULT_CHRISTMAS:
|
||||
%AnimationPlayer.play(\"saint-exupery\")
|
||||
Scenes.id.ADULT_EATING:
|
||||
%AnimationPlayer.play(\"refectory\")
|
||||
Scenes.id.ADULT_UNI:
|
||||
%AnimationPlayer.play(\"university\")
|
||||
Scenes.id.ADULT_THERAPY:
|
||||
%AnimationPlayer.play(\"rosenthal\")
|
||||
Scenes.id.ADULT_BURNOUT:
|
||||
%AnimationPlayer.play()
|
||||
_:
|
||||
%AnimationPlayer.play(\"hirschfeld\")
|
||||
"
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_80ahk"]
|
||||
interpolation_mode = 2
|
||||
interpolation_color_space = 1
|
||||
|
|
@ -325,7 +299,7 @@ _data = {
|
|||
}
|
||||
|
||||
[node name="SubwayMap" type="Node2D"]
|
||||
script = SubResource("GDScript_80ahk")
|
||||
script = ExtResource("1_to33c")
|
||||
current_station = 3
|
||||
|
||||
[node name="SubwayMap" type="Sprite2D" parent="."]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
extends Node3D
|
||||
|
||||
signal leave_room
|
||||
|
||||
func _ready() -> void:
|
||||
%PlayerDetect.body_entered.connect(func(body): if body is PlayerController: leave_room.emit())
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://drckddvj5023u
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
[ext_resource type="PackedScene" uid="uid://bbml6p0ytrhv1" path="res://base-environments/transition/import/burnout_station.glb" id="1_x3aag"]
|
||||
[ext_resource type="Shader" uid="uid://cw6d1rnwk7825" path="res://base-environments/transition/shaders/station_caustics.gdshader" id="2_2s0i8"]
|
||||
[ext_resource type="Script" uid="uid://drckddvj5023u" path="res://base-environments/transition/stations/burnout_station.gd" id="2_7ss6j"]
|
||||
[ext_resource type="Texture2D" uid="uid://dst0u5b51mx4h" path="res://base-environments/transition/shaders/water_color.exr" id="3_7ss6j"]
|
||||
[ext_resource type="Texture2D" uid="uid://bvlldp00ytilp" path="res://base-environments/transition/shaders/water_noise.png" id="4_5oaxo"]
|
||||
[ext_resource type="Texture2D" uid="uid://lej6m137041f" path="res://base-environments/transition/import/burnout_station_Tiles045_2K-JPG_Color.jpg" id="5_2yh0t"]
|
||||
|
|
@ -9,16 +10,6 @@
|
|||
[ext_resource type="Texture2D" uid="uid://4aeuab7yi3pc" path="res://base-environments/transition/import/burnout_station_Tiles045_2K-JPG_Roughness.png" id="7_nksma"]
|
||||
[ext_resource type="PackedScene" uid="uid://tuv111h6jsnu" path="res://base-environments/transition/import/textures/meta_station_imported.tscn" id="8_51arf"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_x3aag"]
|
||||
script/source = "extends Node3D
|
||||
|
||||
signal leave_room
|
||||
|
||||
func _ready() -> void:
|
||||
%PlayerDetect.body_entered.connect(func(body): if body is Player: leave_room.emit())
|
||||
|
||||
"
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_eo2ru"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_2s0i8")
|
||||
|
|
@ -66,7 +57,7 @@ emission_energy_multiplier = 2.0
|
|||
size = Vector3(2.5820465, 2.4377441, 1)
|
||||
|
||||
[node name="burnout_station" instance=ExtResource("1_x3aag")]
|
||||
script = SubResource("GDScript_x3aag")
|
||||
script = ExtResource("2_7ss6j")
|
||||
|
||||
[node name="curved_station_walls_002" parent="." index="1"]
|
||||
surface_material_override/0 = SubResource("ShaderMaterial_eo2ru")
|
||||
|
|
|
|||
|
|
@ -17,9 +17,10 @@ func start_room():
|
|||
save_game = State.save_game
|
||||
Scenes.player_enable.emit(true)
|
||||
on_first_station()
|
||||
Main.curtain.open()
|
||||
|
||||
var left_first_station: bool = false
|
||||
func on_first_station():
|
||||
func on_first_station() -> void:
|
||||
Scenes.enabled_sequences += 1 << Scenes.id.ADULT_DND
|
||||
await get_tree().create_timer(5.0).timeout
|
||||
%ShedulePlayer_R.play("train_arriving")
|
||||
|
|
@ -61,7 +62,7 @@ func prepare_transition():
|
|||
func unload():
|
||||
pass
|
||||
|
||||
func on_left_train_enter(_body):
|
||||
func on_left_train_enter(_body) -> void:
|
||||
if not left_first_station:
|
||||
left_first_station = true
|
||||
await get_tree().create_timer(2.0).timeout
|
||||
|
|
@ -114,7 +115,7 @@ var on_final: bool = false:
|
|||
await get_tree().create_timer(0.5).timeout
|
||||
if final: prepare_transition()
|
||||
var on_direct_path: bool = false
|
||||
func on_right_train_enter(_body):
|
||||
func on_right_train_enter(_body) -> void:
|
||||
if not left_first_station:
|
||||
on_direct_path = true
|
||||
%Train.get_child(0).door_open = false
|
||||
|
|
|
|||
|
|
@ -2,23 +2,9 @@
|
|||
|
||||
[ext_resource type="PackedScene" uid="uid://dmh8tmuvftqus" path="res://base-environments/transition/import/subway_train.glb" id="1_8e51f"]
|
||||
[ext_resource type="Material" uid="uid://dchm78gv31r6a" path="res://base-environments/transition/shaders/timetravel.tres" id="2_g5p57"]
|
||||
[ext_resource type="Script" uid="uid://cyohujvfoiof7" path="res://base-environments/transition/code/subway_train.gd" id="2_skiem"]
|
||||
[ext_resource type="Texture2D" uid="uid://bewykr0twbplg" path="res://base-environments/transition/import/textures/LateralTren_baseColor_upscayl_2x_realesrgan-x4plus-anime.png" id="5_6pwip"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_6pwip"]
|
||||
script/source = "
|
||||
extends Node3D
|
||||
|
||||
@export var door_open: bool:
|
||||
set(open):
|
||||
|
||||
if is_node_ready() and door_open != open:
|
||||
if open:
|
||||
$AnimationPlayer.play(\"door_open\")
|
||||
else:
|
||||
$AnimationPlayer.play(\"door_close\")
|
||||
door_open=open
|
||||
"
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8e51f"]
|
||||
albedo_color = Color(0.22188288, 0.6046251, 0.8484487, 1)
|
||||
metallic = 0.5
|
||||
|
|
@ -134,7 +120,7 @@ dynamic_range = 4.0
|
|||
propagation = 0.9
|
||||
|
||||
[node name="subway_train" instance=ExtResource("1_8e51f")]
|
||||
script = SubResource("GDScript_6pwip")
|
||||
script = ExtResource("2_skiem")
|
||||
|
||||
[node name="traun_hull" parent="." index="0"]
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_8e51f")
|
||||
|
|
|
|||
|
|
@ -1058,7 +1058,7 @@ transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 6.24
|
|||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7804413, 0, 0)
|
||||
|
||||
[node name="MeshInstance3D8" type="MeshInstance3D" parent="Train/Visuals/Train"]
|
||||
transform = Transform3D(-42.01, 4.075623e-07, 4.340103e-07, -6.330816e-06, -2.8743172, -0.1808367, -5.9450394e-06, 0.1808367, -2.8743172, -3.9468384, 1.286, 2.488358)
|
||||
transform = Transform3D(-42.01, 4.075623e-07, 4.3401042e-07, -6.330816e-06, -2.8743172, -0.1808367, -5.9450413e-06, 0.1808367, -2.8743172, -3.9468384, 1.286, 2.488358)
|
||||
visible = false
|
||||
material_override = SubResource("ShaderMaterial_0vobo")
|
||||
mesh = SubResource("QuadMesh_ppxbm")
|
||||
|
|
@ -1515,13 +1515,14 @@ modulate = Color(1.3519934, 0.8703787, 0.46019563, 1)
|
|||
pixel_size = 0.006
|
||||
texture = SubResource("ViewportTexture_csq32")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
[node name="ScenePlayer" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
root_node = NodePath("AnimationTree")
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_xcyoy")
|
||||
}
|
||||
|
||||
[node name="AnimationTree" type="AnimationTree" parent="AnimationPlayer"]
|
||||
[node name="AnimationTree" type="AnimationTree" parent="ScenePlayer"]
|
||||
root_node = NodePath(".")
|
||||
tree_root = SubResource("AnimationNodeStateMachine_naikh")
|
||||
anim_player = NodePath("..")
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ func play() -> void:
|
|||
|
||||
# 4. Wait for player to burn a card (or skip)
|
||||
print_debug("CardBurner: Waiting for player to burn a card...")
|
||||
handle_direction_input(Vector2.UP)
|
||||
await card_burned
|
||||
|
||||
# 5. Play vanish animation and wait for completion
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ func _load_room(scene_path: String) -> void:
|
|||
var state := ResourceLoader.load_threaded_get_status(scene_path)
|
||||
match state:
|
||||
ResourceLoader.THREAD_LOAD_LOADED:
|
||||
var next_scene := ResourceLoader.load_threaded_get(youth_room_path) as PackedScene
|
||||
var next_scene := ResourceLoader.load_threaded_get(scene_path) as PackedScene
|
||||
State.room = next_scene.instantiate() as RoomTemplate
|
||||
get_tree().root.add_child(State.room)
|
||||
await get_tree().process_frame
|
||||
|
|
|
|||
Loading…
Reference in New Issue