«

在个别场景中实现小行星

emer 发布于 2017-9-19 14:25   2277 次阅读     


然后在tour.xml的scene标签外面书写:

<events name="littleplanetintro_control" keep="true"
        onnewpano="
        if(scene[get(xml.scene)].index == 0 OR scene[get(xml.scene)].index == 4,
        skin_setup_littleplanetintro()
        )"

        />

第0个场景或者第4个场景实现小行星;


或者littleplanetintro="true"


不出现其他添加的东西

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
<action name="skin_setup_littleplanetintro">
copy(lp_scene, xml.scene);
copy(lp_hlookat, view.hlookat);
copy(lp_vlookat, view.vlookat);
copy(lp_fov, view.fov);
copy(lp_fovmax, view.fovmax);
copy(lp_limitview, view.limitview);
set(view.fovmax, 170);
set(view.limitview, lookto);
set(view.vlookatmin, 90);
set(view.vlookatmax, 90);
set_hotspot_visible(false);
set(layer[skin_layer].visible,false);set(layer[skin_layer].alpha,0);
set(layer[skin_control_bar].visible,false);set(layer[skin_control_bar].alpha,0);
set(layer[skin_splitter_bottom].visible,false);set(layer[skin_splitter_bottom].alpha,0);
lookat(calc(lp_hlookat - 180), 90, 150, 1, 0, 0);
        set(lp_running,true);
set(events[lp_events].onloadcomplete,
delayedcall(2.5,
if(lp_scene === xml.scene,
set(control.usercontrol, off);
copy(view.limitview, lp_limitview);
set(view.vlookatmin, null);
set(view.vlookatmax, null);
tween(view.hlookat|view.vlookat|view.fov|view.distortion, calc('' + lp_hlookat + '|' + lp_vlookat + '|' + lp_fov + '|' + 0.0),
3.0, easeOutQuad,
set(control.usercontrol, all);
tween(view.fovmax, get(lp_fovmax));
);
        set(lp_running,false);
set_hotspot_visible(true);
set(layer[skin_layer].visible,true);tween(layer[skin_layer].alpha,1,1);
set(layer[skin_control_bar].visible,true);tween(layer[skin_control_bar].alpha,1,1);
set(layer[skin_splitter_bottom].visible,true);tween(layer[skin_splitter_bottom].alpha,1,1);
);
);
);
</action>
<action name="set_hotspot_visible">
for(set(i,0),i LT hotspot.count,inc(i),
   if(%1 == false,
   if(hotspot[get(i)].visible == true,
   set(hotspot[get(i)].mark,true);set(hotspot[get(i)].visible,%1);
   );
   ,
   if(hotspot[get(i)].mark == true OR hotspot[get(i)].mark2 == true,
   set(hotspot[get(i)].visible,%1);
   );
   );
  
);
</action>