51 lines
771 B
GDScript
51 lines
771 B
GDScript
extends Window
|
|
|
|
## 开始实训信号
|
|
signal StartTraining
|
|
## 退出信号
|
|
signal QuitTraining
|
|
|
|
## 场景说明
|
|
@export var sceneDesc: String = "场景描述"
|
|
## 实训模式枚举
|
|
enum Training_Mode{
|
|
Teach,#教学模式
|
|
Practice,# 练习模式
|
|
Exam,# 考试模式
|
|
}
|
|
var trainingMode = Training_Mode.Teach
|
|
|
|
func _ready():
|
|
update()
|
|
|
|
func updateSceneDesc(desc):
|
|
sceneDesc = desc
|
|
update()
|
|
|
|
func update():
|
|
%SceneDescription.text = sceneDesc
|
|
|
|
|
|
func _on_start_pressed():
|
|
StartTraining.emit()
|
|
hide()
|
|
|
|
func _on_quit_pressed():
|
|
QuitTraining.emit()
|
|
hide()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_teach_mode_pressed():
|
|
trainingMode = Training_Mode.Teach
|
|
|
|
|
|
func _on_practice_mode_pressed():
|
|
trainingMode = Training_Mode.Practice
|
|
|
|
|
|
func _on_exam_mode_pressed():
|
|
trainingMode = Training_Mode.Exam
|