-
Notifications
You must be signed in to change notification settings - Fork 0
/
sematrix.script
58 lines (52 loc) · 1.13 KB
/
sematrix.script
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Window Sizes
window_width = Window.GetWidth();
window_height = Window.GetHeight();
screen_x = Window.GetX();
screen_y = Window.GetY();
# Background is Black
time = 0;
# Importing images
logo.matrix1 = Image("1.png");
logo.matrix2 = Image("2.png");
logo.matrix3 = Image("3.png");
logo.matrix4 = Image("4.png");
logo.matrix5 = Image("5.png");
logo.matrix6 = Image("6.png");
# Sprites
logo.sprite = Sprite(logo.matrix1);
logo.sprite.SetOpacity (1.0);
logo.sprite.SetX(screen_x);
logo.sprite.SetY(screen_y);
fun refreshHandler() {
if (time < 32){
time = time + 1;
}
else {
time = 0;
}
if (time == 5){
logo.sprite.SetImage(logo.matrix1);
}
else {
if (time == 10){
logo.sprite.SetImage(logo.matrix2);
}
else {
if (time == 15){
logo.sprite.SetImage(logo.matrix3);
}
else {
if (time == 20){
logo.sprite.SetImage(logo.matrix4);
}
else {
if (time == 25){
logo.sprite.SetImage(logo.matrix5);
}
else {
if (time == 30){
logo.sprite.SetImage(logo.matrix6);
}
}}}}}
}
Plymouth.SetRefreshFunction (refreshHandler);