Skip to content

Commit

Permalink
Fix the UI
Browse files Browse the repository at this point in the history
- Fix the timer UI
- Remove unused data
  • Loading branch information
thedoctor2001 committed Nov 13, 2024
1 parent 48ce2b4 commit 9577ee1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Gama/models/version 2/Flooding VR2.gaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,6 @@ species unity_linker parent: abstract_unity_linker {
do send_message players: unity_player as list mes: ["score":: int(100*evacuated/nb_of_people)];
}
action add_to_send_world(map map_to_send) {
map_to_send["evacuated"] <- int(evacuated);
map_to_send["score"] <- int(100*evacuated/nb_of_people);
map_to_send["remaining_time"] <- int((current_timeout - gama.machine_time)/1000);
map_to_send["state"] <- world.state;
//map_to_send["winning"] <- winning;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,16 @@ void UpdateGame()

}

if (infoWorld.remaining_time > LastTime)
if (infoWorld.state != "s_init" && infoWorld.remaining_time > LastTime)
{
timer.gameObject.SetActive(true);
//InitDikingTimer = true;
Debug.Log("Remaining time: " + infoWorld.remaining_time);
timer.StartEnergizedEffect(infoWorld.remaining_time);
}

if (infoWorld.state == "s_init" || UIController.Instance.UI_EndingPhase_eng.activeSelf || UIController.Instance.UI_EndingPhase_viet.activeSelf)
timer.gameObject.SetActive(false);

LastTime = infoWorld.remaining_time;
}
}
Expand Down

0 comments on commit 9577ee1

Please sign in to comment.