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