Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Rowan |
This is my code.
extends TextureRect
func _ready():
var Day = load('res://Assets/Background.png')
var Night = load('res://Assets/Background_Night.png')
var time = OS.get_time()
var hour = time.hour
if 6 < hour < 20:
.set_texture(Day)
else:
.set_texture(Night)
Thank you, @dancaer69 and @timothybrentwood! You both gave quick, useful responses!
Rowan | 2021-05-29 19:30