Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс WeatherPhenomenon

Закрытые члены

void WeatherPhenomenon ()
 
void ~WeatherPhenomenon ()
 
proto native EWeatherPhenomenon GetType ()
 Returns type of this phenomenon.
 
proto native float GetActual ()
 Returns actual value of phenomenon in range <0, 1>.
 
proto native float GetForecast ()
 Returns a forecast value the phenomenon is heading towards.
 
proto native void Set (float forecast, float time=0, float minDuration=0)
 Sets the forecast.
 
proto native float GetNextChange ()
 Reads the time in seconds when the next forecast will be computed.
 
proto native void SetNextChange (float time)
 Sets the time in seconds when the next forecast will be computed.
 
proto void GetLimits (out float fnMin, out float fnMax)
 Reads limits of this phenomenon.
 
proto native void SetLimits (float fnMin, float fnMax)
 Sets limits of this phenomenon.
 
proto void GetForecastChangeLimits (out float fcMin, out float fcMax)
 Reads limits of change when forecast is computed.
 
proto native void SetForecastChangeLimits (float fcMin, float fcMax)
 Sets limits of change when forecast is computed.
 
proto void GetForecastTimeLimits (out float ftMin, out float ftMax)
 Reads time range in which next forecast can be computed.
 
proto native void SetForecastTimeLimits (float ftMin, float ftMax)
 Sets time range in which next forecast can be computed.
 
bool OnBeforeChange (float change, float time)
 Is called every time the Phenomenon computes new forecast.
 

Подробное описание

Weather phenomenon

Конструктор(ы)

◆ WeatherPhenomenon()

void WeatherPhenomenon ( )
inlineprivate
24{}

◆ ~WeatherPhenomenon()

void ~WeatherPhenomenon ( )
inlineprivate
25{}

Методы

◆ GetActual()

proto native float GetActual ( )
private

Returns actual value of phenomenon in range <0, 1>.

Используется в OnBeforeChange().

◆ GetForecast()

proto native float GetForecast ( )
private

Returns a forecast value the phenomenon is heading towards.

◆ GetForecastChangeLimits()

proto void GetForecastChangeLimits ( out float fcMin,
out float fcMax )
private

Reads limits of change when forecast is computed.

Аргументы
fcMinForecast change minimum (in range <0, 1>).
fcMaxForecast change maximum (in range <0, 1>).

◆ GetForecastTimeLimits()

proto void GetForecastTimeLimits ( out float ftMin,
out float ftMax )
private

Reads time range in which next forecast can be computed.

Аргументы
ftMinMinimal number of seconds.
ftMaxMaximal number of seconds.

◆ GetLimits()

proto void GetLimits ( out float fnMin,
out float fnMax )
private

Reads limits of this phenomenon.

Аргументы
fnMinFunction minimum (in range <0, 1>).
fnMaxFunction maximum (in range <0, 1>).

◆ GetNextChange()

proto native float GetNextChange ( )
private

Reads the time in seconds when the next forecast will be computed.

◆ GetType()

proto native EWeatherPhenomenon GetType ( )
private

Returns type of this phenomenon.

Используется в OnBeforeChange().

◆ OnBeforeChange()

bool OnBeforeChange ( float change,
float time )
inlineprivate

Is called every time the Phenomenon computes new forecast.

Заметки
Called on server only.
Аргументы
changeComputed change of forecast value.
timeSeconds when the next forecast will be computed.
Возвращает
True when script modifies state of this phenomenon false otherwise.
119 {
120 // check if mission forces use of custom weather
121 Weather weather = g_Game.GetWeather();
122
123 if ( weather.GetMissionWeather() )
124 return false;
125
126 // check for active worlddata with custom onbeforechange behaviour
127 Mission currentMission = g_Game.GetMission();
128
129 if ( currentMission )
130 {
131 WorldData worldData = currentMission.GetWorldData();
132 if ( worldData )
133 {
134 return worldData.WeatherOnBeforeChange( GetType(), GetActual(), change, time );
135 }
136 }
137
138 return false;
139 }
DayZGame g_Game
Definition DayZGame.c:3746
Mission class.
Definition gameplay.c:681
Definition EntityAI.c:95
Definition Weather.c:155
proto native EWeatherPhenomenon GetType()
Returns type of this phenomenon.
proto native float GetActual()
Returns actual value of phenomenon in range <0, 1>.
Keeps information about currently loaded world, like temperature.
Definition WorldData.c:3

Перекрестные ссылки g_Game, GetActual() и GetType().

◆ Set()

proto native void Set ( float forecast,
float time = 0,
float minDuration = 0 )
private

Sets the forecast.

Аргументы
forecastDesired forecast value that should be met in given time.
timeA time of the next change (how long it takes in seconds to interpolate to given value).
minDurationA minimal time in seconds the change will last.

◆ SetForecastChangeLimits()

proto native void SetForecastChangeLimits ( float fcMin,
float fcMax )
private

Sets limits of change when forecast is computed.

These limits govern how much the forecast value can change when it is computed by weather controller.

Default values are: fcMin = 0 fcMax = 1

Аргументы
fcMinForecast change minimum (in range <0, 1>).
fcMaxForecast change maximum (in range <0, 1>).

◆ SetForecastTimeLimits()

proto native void SetForecastTimeLimits ( float ftMin,
float ftMax )
private

Sets time range in which next forecast can be computed.

Default values are: ftMin = 300 (5 minutes) ftMax = 3600 (1 hour)

Аргументы
ftMinMinimal number of seconds.
ftMaxMaximal number of seconds.

◆ SetLimits()

proto native void SetLimits ( float fnMin,
float fnMax )
private

Sets limits of this phenomenon.

Actual value of this phenomenon will be always held in range <fnMin, fnMax>.

Default values are: fnMin = 0 fnMax = 1

Аргументы
fnMinFunction minimum (in range <0, 1>).
fnMaxFunction maximum (in range <0, 1>).

◆ SetNextChange()

proto native void SetNextChange ( float time)
private

Sets the time in seconds when the next forecast will be computed.


Объявления и описания членов класса находятся в файле: