-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRedEye.script
More file actions
30 lines (21 loc) · 1.03 KB
/
RedEye.script
File metadata and controls
30 lines (21 loc) · 1.03 KB
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
# Made By:- Shivam Singh
# Don't forget to follow on github:- https://github.com/sd-shiivam
screen_width = Window.GetWidth(0);
screen_height = Window.GetHeight(0);
screen_half_width = Window.GetWidth(0) / 2;
screen_half_height = Window.GetHeight(0) / 2;
//------------------------------- (Image Animation) ------------------------------//
for (i = 0; i < 59; i++)
flyingman_image[i] = Image("progress-" + i + ".png");
flyingman_sprite = Sprite();
//------------------------------- (Image Position) ------------------------------//
flyingman_sprite.SetX(Window.GetX() + (Window.GetWidth(0) / 2 - flyingman_image[0].GetWidth() / 2)); # Place images in the center
flyingman_sprite.SetY(Window.GetY() + (Window.GetHeight(0) / 2 - flyingman_image[0].GetHeight() / 2));
progress = 1;
//------------------------------ (Image Refresh-Rate) ------------------------------//
fun refresh_callback ()
{
flyingman_sprite.SetImage(flyingman_image[Math.Int(progress / 2) % 79]);
progress++;
}
Plymouth.SetRefreshFunction (refresh_callback);