making levels

This commit is contained in:
Clevertop 2024-08-13 22:45:09 +10:00
parent cc0014f3e8
commit 716dae1d33
17 changed files with 451 additions and 61 deletions

View file

@ -12,7 +12,7 @@ func _ready():
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
for level_num in GameManager.levels.size():
var new_button : Button = Button.new()
new_button.text = "Level " + str(level_num) + " : " + GameManager.levels[level_num].level_name
new_button.text = "Level " + str(level_num+1) + " : " + GameManager.levels[level_num].level_name
new_button.pressed.connect(func(): pick_level(GameManager.levels[level_num].level_name))
levels_vbox.add_child(new_button)

32
Scripts/sign.gd Normal file
View file

@ -0,0 +1,32 @@
@tool
extends Node3D
@export_multiline var sign_text : String:
set(new_text):
sign_text = new_text
sign_label3d.text = sign_text
@export var show_pole : bool:
set(new_val):
show_pole = new_val
pole.visible = show_pole
@export var sign_label3d : Label3D
@export var pole : Node3D
# Called when the node enters the scene tree for the first time.
func _ready():
sign_label3d = $Label3D
pole = $MeshInstance3D2
pole.visible = show_pole
sign_label3d.text = sign_text
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass