-
Notifications
You must be signed in to change notification settings - Fork 2
/
CustomTransition.asc
63 lines (57 loc) · 1.84 KB
/
CustomTransition.asc
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
59
60
61
62
63
// new module script
Timer * tVisibleFalseAfter;
void CustomTransition_IntantFadeIn(){
gBloodTransition.Visible = false;
gBloodTransition.Transparency = 100;
gCustomTransition.Visible = false;
gCustomTransition.Transparency = 100;
}
void CustomTransition_IntantFadeOut(){
gBloodTransition.Visible = false;
gBloodTransition.Transparency = 100;
gCustomTransition.Visible = true;
gCustomTransition.Transparency = 0;
}
void CustomTransition_FadeIn(float ftime , TweenStyle blocking, float delay){
if(FloatToInt(ftime) == 0){
ftime = 0.3;
}
if (!Game.SkippingCutscene){
gBloodTransition.Transparency = 100;
gBloodTransition.Visible = false;
gCustomTransition.Transparency = 0;
gCustomTransition.Visible = true;
tVisibleFalseAfter = Timer.StartRT(ftime+delay, eOnce);
gCustomTransition.TweenTransparency(ftime, 100, eEaseLinearTween, blocking, delay);
} else {
CustomTransition_IntantFadeIn();
}
}
void CustomTransition_FadeOut(float ftime , TweenStyle blocking, float delay){
if(FloatToInt(ftime) == 0){
ftime = 0.3;
}
if (!Game.SkippingCutscene){
gBloodTransition.Transparency = 0;
gBloodTransition.Visible = true;
gBloodTransition.X = 0;
gBloodTransition.Y = -800;
gCustomTransition.Transparency = 100;
gCustomTransition.Visible = true;
gBloodTransition.TweenY(ftime/2.0, 0, eEaseLinearTween, blocking, delay);
gCustomTransition.TweenTransparency(ftime/2.0, 0, eEaseLinearTween, blocking);
} else {
CustomTransition_IntantFadeOut();
}
}
function repeatedly_execute_always() {
if(IsGamePaused() == 1 || !System.HasInputFocus){
return;
}
if(tVisibleFalseAfter!=null){
if(tVisibleFalseAfter.EvtExpired){
tVisibleFalseAfter=null;
gCustomTransition.Visible = false;
}
}
}