Fix weather
This commit is contained in:
parent
aa9f0fc978
commit
a3cefb6e63
@ -527,6 +527,14 @@ core.registerWeather('blood', function (level) {
|
|||||||
|
|
||||||
样板的云`cloud`和雾`fog`均由多个图片叠加移动实现;如果你想实现类似效果,可直接使用`core.control.__animateFrame_weather_image`作为`frameFunc`,详见样板的云雾实现。
|
样板的云`cloud`和雾`fog`均由多个图片叠加移动实现;如果你想实现类似效果,可直接使用`core.control.__animateFrame_weather_image`作为`frameFunc`,详见样板的云雾实现。
|
||||||
|
|
||||||
|
另外注意的是,注册的天气无法在事件编辑器的下拉框中选择;你可以选择脚本调用`core.setWeather`,或者修改`_server/MotaAction.g4`中的`Weather_List`:
|
||||||
|
|
||||||
|
```js
|
||||||
|
Weather_List
|
||||||
|
: '无'|'雨'|'雪'|'晴'|'雾'|'云'
|
||||||
|
/*Weather_List ['null','rain','snow','sun','fog','cloud']*/;
|
||||||
|
```
|
||||||
|
|
||||||
### registerSystemEvent
|
### registerSystemEvent
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@ -2466,7 +2466,7 @@ var terndefs_f6783a0a_522d_417e_8407_94c67b692e50 = [
|
|||||||
},
|
},
|
||||||
"registerWeather": {
|
"registerWeather": {
|
||||||
"!doc": "注册一个天气<br/>name: 要注册的天气名<br/>initFunc: 当切换到此天气时的初始化;接受level(天气等级)为参数;可用于创建多个节点(如初始化雪花)<br/>frameFunc: 每帧的天气效果变化;可接受timestamp(从页面加载完毕到当前所经过的时间)和level(天气等级)作为参数<br/>天气应当仅在weather层进行绘制,推荐使用core.animateFrame.weather.nodes用于节点信息。",
|
"!doc": "注册一个天气<br/>name: 要注册的天气名<br/>initFunc: 当切换到此天气时的初始化;接受level(天气等级)为参数;可用于创建多个节点(如初始化雪花)<br/>frameFunc: 每帧的天气效果变化;可接受timestamp(从页面加载完毕到当前所经过的时间)和level(天气等级)作为参数<br/>天气应当仅在weather层进行绘制,推荐使用core.animateFrame.weather.nodes用于节点信息。",
|
||||||
"!type": "fn(name: string, initFunc: fn(level: number), frameFunc?: fn( timestamp: number, level: number))"
|
"!type": "fn(name: string, initFunc: fn(level: number), frameFunc?: fn(timestamp: number, level: number))"
|
||||||
},
|
},
|
||||||
"stopReplay": {
|
"stopReplay": {
|
||||||
"!doc": "停止播放",
|
"!doc": "停止播放",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user