add curtains to 1-stage
This commit is contained in:
parent
47abd1306e
commit
d9c92ccb98
11 changed files with 618 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
|||
extends Node
|
||||
|
||||
var Generic1Stage = {
|
||||
"name": "Generic 1 Stage",
|
||||
"name": "Generic 1-Stage",
|
||||
"scene": "res://Scenes/FreeRoam/Generic/Generic1Stage.tscn",
|
||||
"stage": Stages.Cyber1Stage,
|
||||
"stage_base_path": "Generic1Stage/StageAssets"
|
||||
"curtains": [ "Curtain" ]
|
||||
}
|
||||
|
||||
var MapIndex = {
|
||||
|
|
|
@ -430,6 +430,8 @@ var Cyber1Stage = {
|
|||
52: { "bot": "Spots", "movement": "Munch", "flow_in": "None", "flow_out": "None" },
|
||||
53: { "bot": "Spots", "movement": "Jasper", "flow_in": "None", "flow_out": "None" },
|
||||
54: { "bot": "Spots", "movement": "Pasqually", "flow_in": "None", "flow_out": "None" },
|
||||
61: { "bot": "Curtain", "movement": "Up", "flow_in": 0.2, "flow_out": 0.2 },
|
||||
62: { "bot": "Curtain", "movement": "Down", "flow_in": 0.2, "flow_out": 0.2 },
|
||||
65: { "bot": "Floods", "movement": "CEC Red", "flow_in": "None", "flow_out": "None" },
|
||||
66: { "bot": "Floods", "movement": "CEC Amber", "flow_in": "None", "flow_out": "None" },
|
||||
67: { "bot": "Floods", "movement": "CEC Blue", "flow_in": "None", "flow_out": "None" },
|
||||
|
|
|
@ -225,9 +225,14 @@ func _physics_process(_delta: float) -> void:
|
|||
update_time_label()
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("freeroam_open_curtains"):
|
||||
for curtain in FreeRoamMaps.MapIndex[get_node("../").current_map]["curtains"]:
|
||||
get_node("../../" + curtain + "/AnimationPlayer").speed_scale = 0.2
|
||||
get_node("../../" + curtain + "/AnimationPlayer").play("Up")
|
||||
if (transport_enabled):
|
||||
if event.is_action_pressed("freeroam_transport_play_pause"):
|
||||
if (playing): _on_pause_button_pressed()
|
||||
else: _on_play_button_pressed()
|
||||
elif event.is_action_pressed("freeroam_transport_stop"):
|
||||
_on_stop_button_pressed()
|
||||
|
||||
|
|
17
Scripts/OneWayController.gd
Normal file
17
Scripts/OneWayController.gd
Normal file
|
@ -0,0 +1,17 @@
|
|||
extends Node3D
|
||||
|
||||
var animation_player
|
||||
|
||||
var last_anim_name = ""
|
||||
|
||||
func _ready():
|
||||
animation_player = $AnimationPlayer
|
||||
|
||||
func _movement_in(movement, rate):
|
||||
if (movement != last_anim_name):
|
||||
animation_player.speed_scale = rate
|
||||
animation_player.play(movement)
|
||||
last_anim_name = movement
|
||||
|
||||
func _movement_out(_movement, _rate):
|
||||
pass # lol pranked
|
1
Scripts/OneWayController.gd.uid
Normal file
1
Scripts/OneWayController.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://csyks2ufy3o3x
|
Loading…
Add table
Add a link
Reference in a new issue