mirror of
https://gitlab.com/echtnurich/windozexp-enhanced.git
synced 2024-11-22 07:49:15 +01:00
add random frezeing
This commit is contained in:
parent
75fd7532b2
commit
6f14222e1b
1 changed files with 14 additions and 3 deletions
|
@ -11,6 +11,8 @@ if ( Plymouth.GetMode () == "boot" )
|
||||||
logo.sprite.SetZ (10000);
|
logo.sprite.SetZ (10000);
|
||||||
logo.sprite.SetOpacity (1);
|
logo.sprite.SetOpacity (1);
|
||||||
progress = 0;
|
progress = 0;
|
||||||
|
freezecounter = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
progress_box.image = Image("throbber-038.png");
|
progress_box.image = Image("throbber-038.png");
|
||||||
|
@ -40,10 +42,19 @@ fun refresh ()
|
||||||
mode = Plymouth.GetMode ();
|
mode = Plymouth.GetMode ();
|
||||||
if (status == "normal" && mode == "boot" )
|
if (status == "normal" && mode == "boot" )
|
||||||
{
|
{
|
||||||
|
if (freezecounter == 0) {
|
||||||
progress++;
|
progress++;
|
||||||
|
}
|
||||||
if (progress >= 89)
|
else {
|
||||||
|
freezecounter--;
|
||||||
|
}
|
||||||
|
if (progress >= 89) {
|
||||||
progress = 0;
|
progress = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Math.Random() > 0.95) {
|
||||||
|
freezecounter = Math.Random()*10*50
|
||||||
|
}
|
||||||
|
|
||||||
new_progress_box.image = Image("throbber-0" + progress/2 + ".png");
|
new_progress_box.image = Image("throbber-0" + progress/2 + ".png");
|
||||||
progress_box.sprite.SetImage(new_progress_box.image);
|
progress_box.sprite.SetImage(new_progress_box.image);
|
||||||
|
|
Loading…
Reference in a new issue