fixing bugs meow
This commit is contained in:
parent
c969e0bee2
commit
4a9193e549
27 changed files with 370 additions and 40 deletions
60
scenes/manager/location_manager.gd
Normal file
60
scenes/manager/location_manager.gd
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
extends Control
|
||||
|
||||
var block_moving = false
|
||||
@export var normal_color : Color
|
||||
@export var selected_color : Color
|
||||
@export var ewaste_button : Button
|
||||
@export var workshop_button: Button
|
||||
@export var room_button : Button
|
||||
var current_location : Location
|
||||
@export var move_blocker_panel : PanelContainer
|
||||
|
||||
enum Location{
|
||||
ewaste,
|
||||
workshop,
|
||||
room
|
||||
}
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
hide()
|
||||
current_location = Location.workshop
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
move_blocker_panel.visible = block_moving
|
||||
|
||||
if current_location == Location.ewaste:
|
||||
ewaste_button.self_modulate = selected_color
|
||||
else:
|
||||
ewaste_button.self_modulate = normal_color
|
||||
|
||||
if current_location == Location.workshop:
|
||||
workshop_button.self_modulate = selected_color
|
||||
else:
|
||||
workshop_button.self_modulate = normal_color
|
||||
|
||||
if current_location == Location.room:
|
||||
room_button.self_modulate = selected_color
|
||||
else:
|
||||
room_button.self_modulate = normal_color
|
||||
|
||||
func goto_ewaste():
|
||||
if current_location == Location.ewaste:
|
||||
return
|
||||
current_location = Location.ewaste
|
||||
get_tree().change_scene_to_file("res://scenes/ewaste.tscn")
|
||||
|
||||
func goto_workshop():
|
||||
if current_location == Location.workshop:
|
||||
return
|
||||
current_location = Location.workshop
|
||||
get_tree().change_scene_to_file("res://scenes/workshop.tscn")
|
||||
|
||||
func goto_room():
|
||||
if current_location == Location.room:
|
||||
return
|
||||
current_location = Location.room
|
||||
get_tree().change_scene_to_file("res://scenes/room.tscn")
|
||||
Loading…
Add table
Add a link
Reference in a new issue