1. WeatherEffect
天气效果,下雨和下雪、雾、夜晚、白天
1.1. 方法
1.1.1. weatherEffect.switchRain()
开启下雨效果
Example
ws.switchRain()
1.1.2. weatherEffect.switchSnow()
开启下雪效果
Example
ws.switchSnow()
1.1.3. weatherEffect.switchFog(depthColorAlpha)
开启雾效果
Param | Type | Description |
---|---|---|
depthColorAlpha | number |
深度阈值,越大雾浓度效果越大,反之效果越弱,范围0-1.0 |
Example
ws.switchFog(0.5)
1.1.4. weatherEffect.switchNight()
夜晚
Example
ws.switchNight()
1.1.5. weatherEffect.switchDay()
白天
Example
ws.switchDay()
1.1.6. weatherEffect.clear()
移除夜晚白天效果
Example
ws.clear()
1.1.7. weatherEffect.stopRain()
停止下雨
Example
ws.stopRain()
1.1.8. weatherEffect.stopSnow()
停止下雪
Example
ws.stopSnow()
1.1.9. weatherEffect.stopFog()
停止雾
Example
ws.stopFog()
1.1.10. weatherEffect.remove()
移除