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
|
<action name="webvr_onentervr">
if(layer[webvr_enterbutton], tween(layer[webvr_enterbutton].alpha,0,0); );
webvr_showbuttons();
webvr_hide_all_non_vr_layers();
if(webvr.isfake, webvr_show_fakemode_info(true); );
webvr_load_vr_cursor_hs();
</action>
<action name="webvr_onexitvr">
removehotspot('vr_cursor');
removehotspot('vr_controller_l');
removehotspot('vr_controller_r');
set(have_vr_controllers, false);
stopdelayedcall(vr_button_fadeout);
if(layer[webvr_enterbutton], tween(layer[webvr_enterbutton].alpha,1); );
tween(layer[webvr_exitbutton].alpha,0);
tween(layer[webvr_setupbutton].alpha,0);
webvr_show_fakemode_info(false);
webvr_restore_layers();
</action>
<action name="webvr_hide_all_non_vr_layers" scope="local">
for(set(i,0), i LT layer.count, inc(i),
copy(lr, layer[get(i)]);
if(lr.vr !== true,
copy(lr.vr_backup_visible, lr.visible);
set(lr.visible, false);
);
);
</action>
<action name="webvr_restore_layers" scope="local">
for(set(i,0), i LT layer.count, inc(i),
copy(lr, layer[get(i)]);
if(lr.vr_backup_visible,
copy(lr.visible, lr.vr_backup_visible);
delete(lr.vr_backup_visible);
);
);
</action>
|