Removed day-night cycle in tutorial
This commit is contained in:
parent
28cf85bb46
commit
0a76f14556
1 changed files with 0 additions and 18 deletions
|
@ -61,27 +61,9 @@ func _process(delta):
|
||||||
Global.musicUpdated = true
|
Global.musicUpdated = true
|
||||||
if Global.tutorialTimerCompleted:
|
if Global.tutorialTimerCompleted:
|
||||||
audio_stream_player.playing = false
|
audio_stream_player.playing = false
|
||||||
change_time_of_day()
|
|
||||||
|
|
||||||
|
|
||||||
func play_music(music):
|
func play_music(music):
|
||||||
audio_stream_player.set_stream(music)
|
audio_stream_player.set_stream(music)
|
||||||
add_child(audio_stream_player)
|
add_child(audio_stream_player)
|
||||||
audio_stream_player.play()
|
audio_stream_player.play()
|
||||||
|
|
||||||
var num = 1
|
|
||||||
var day = true
|
|
||||||
var sensitivity = 0.00025
|
|
||||||
|
|
||||||
func change_time_of_day():
|
|
||||||
if num <= 1 and day:
|
|
||||||
num = num - sensitivity
|
|
||||||
if num <= 0.05:
|
|
||||||
day = false
|
|
||||||
elif num >= 0 and not day:
|
|
||||||
num = num + sensitivity
|
|
||||||
if num >= 1:
|
|
||||||
day = true
|
|
||||||
environment.background_energy_multiplier = num
|
|
||||||
environment.ambient_light_sky_contribution = num
|
|
||||||
$DirectionalLight3D.light_energy = num
|
|
||||||
|
|
Loading…
Reference in a new issue