fix app
This commit is contained in:
@@ -44,6 +44,7 @@ function apply_menu_settings_to_config() {
|
||||
function on_menu_start_game_press() {
|
||||
apply_menu_settings_to_config()
|
||||
hide_scene("Menu")
|
||||
start_game_initilized()
|
||||
load_Clock_scene()
|
||||
}
|
||||
|
||||
|
||||
+16
-2
@@ -44,6 +44,10 @@ config = {
|
||||
first_time : true
|
||||
}
|
||||
|
||||
function start_game_initilized(){
|
||||
trais = !config.trais;
|
||||
toggle_trais()
|
||||
}
|
||||
|
||||
function load_endgame_scene(){
|
||||
has_start = false
|
||||
@@ -74,8 +78,7 @@ function load_menu_scene(){
|
||||
}
|
||||
|
||||
function inizalize_clock(){
|
||||
trais = !config.trais
|
||||
toggle_trais()
|
||||
|
||||
White.Time = config.StartTimeWhite
|
||||
White.moveLeft = config.StartMoveLeft
|
||||
Black.Time = config.StartTimeBlack
|
||||
@@ -86,6 +89,7 @@ function inizalize_clock(){
|
||||
if (config.first_time) {
|
||||
config.first_time = false
|
||||
show_start_clock_button()
|
||||
|
||||
}else{
|
||||
start()
|
||||
}
|
||||
@@ -107,6 +111,7 @@ function start(){
|
||||
}
|
||||
|
||||
function load_cube_scene(){
|
||||
init_Cube()
|
||||
has_start = false
|
||||
|
||||
config.StartTimeWhite = White.Time
|
||||
@@ -136,6 +141,14 @@ function load_cube_scene(){
|
||||
|
||||
}
|
||||
|
||||
function init_Cube(){
|
||||
black_Timer.classList.remove("RedClick")
|
||||
black_Timer.classList.remove("GreenClick")
|
||||
white_Timer.classList.remove("RedClick")
|
||||
white_Timer.classList.remove("GreenClick")
|
||||
|
||||
}
|
||||
|
||||
function black_timer_touch(){
|
||||
if (!Timer.Black_Has_started){
|
||||
Timer.coldown_Start_Black = Date.now()
|
||||
@@ -201,6 +214,7 @@ function black_touch(){
|
||||
if (!has_start) return null
|
||||
Black.moveLeft -= 1
|
||||
if (Black.moveLeft == 0){
|
||||
toggle_trais()
|
||||
load_cube_scene()
|
||||
}else{
|
||||
toggle_trais()
|
||||
|
||||
Reference in New Issue
Block a user