-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfflorent.script
More file actions
35 lines (28 loc) · 757 Bytes
/
fflorent.script
File metadata and controls
35 lines (28 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Définir la taille de l'écran
screen_width = Window.GetWidth();
screen_height = Window.GetHeight();
# Charger une image
logo_image = Image("frame-1.png");
nframes = 17;
for (i = 1; i <= nframes; i++)
imgs[i] = Image("frame-" + i + ".png");
# Calculer position centrée
image_width = logo_image.GetWidth();
image_height = logo_image.GetHeight();
logo_x = (screen_width - image_width) / 2;
logo_y = (screen_height - image_height) / 2;
# Afficher l'image
logo_sprite = Sprite(logo_image);
logo_sprite.SetPosition(logo_x, logo_y);
logo_sprite.SetImage(imgs[15]);
frame = 0;
time = 0;
fun refresh_callback ()
{
if ((time % 10) == 0) {
logo_sprite.SetImage(imgs[frame%17]);
frame++;
}
time++;
}
Plymouth.SetRefreshFunction (refresh_callback);