This commit is contained in:
gemdude46 2023-01-30 19:49:06 +00:00
parent 599dbb66e4
commit fc5f9630bd
9 changed files with 11 additions and 10 deletions

BIN
Replays/L1Easy.dat Normal file

Binary file not shown.

BIN
Replays/L2Easy.dat Normal file

Binary file not shown.

Binary file not shown.

View File

@ -6,6 +6,7 @@ var letty_snow = load("res://BGM/Letty_Snow_-_Utsuho.mp3")
var score_end = load("res://BGM/Score_End_-_Utsuho.mp3") var score_end = load("res://BGM/Score_End_-_Utsuho.mp3")
var player : AudioStreamPlayer var player : AudioStreamPlayer
var difficulty: String = "Easy"
func _ready(): func _ready():

File diff suppressed because one or more lines are too long

View File

@ -128,6 +128,7 @@ offset = Vector2( 0, -15 )
[node name="Rival" parent="." instance=ExtResource( 6 )] [node name="Rival" parent="." instance=ExtResource( 6 )]
position = Vector2( -659, -479 ) position = Vector2( -659, -479 )
replay_file = "res://Replays/L2%s.dat"
[node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="CanvasLayer" type="CanvasLayer" parent="."]
script = ExtResource( 13 ) script = ExtResource( 13 )

View File

@ -2,7 +2,7 @@ extends Node
class_name PlayerRecorder class_name PlayerRecorder
var replay: ReplayRecording var replay: ReplayRecording
var this_frame: bool = true var this_frame: int = 0
var sprite: int = 0 var sprite: int = 0
var player: Node var player: Node
var scene: Node var scene: Node
@ -21,15 +21,14 @@ func _ready():
scene = player.get_parent() scene = player.get_parent()
func _physics_process(_delta): func _physics_process(_delta):
print(_delta) if this_frame == 0:
if this_frame: this_frame = 1
this_frame = false
replay.positions.append(player.pos) replay.positions.append(player.pos)
replay.sprites.append(sprite) replay.sprites.append(sprite)
replay.frames += 1 replay.frames += 1
else: else:
this_frame = true this_frame -= 1
func save(): func save():
replay.save_to_uri(save_to) replay.save_to_uri(save_to)

View File

@ -7,7 +7,7 @@ export var replay_file: String
func _ready(): func _ready():
._ready() ._ready()
replay = ReplayRecording.new() replay = ReplayRecording.new()
replay.load_from_uri(replay_file) replay.load_from_uri(replay_file % MusicController.difficulty)
func process_unit(delta : float, time_elapsed : float): func process_unit(delta : float, time_elapsed : float):

View File

@ -63,7 +63,7 @@ _global_script_class_icons={
[application] [application]
config/name="Moriya's Wanton Winter Wager" config/name="Moriya's Wanton Winter Wager"
run/main_scene="res://Scenes/DownhillAutoscroller.tscn" run/main_scene="res://Scenes/DownhillAutoscroller2.tscn"
config/icon="res://icon.png" config/icon="res://icon.png"
[autoload] [autoload]