DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
OutdoorThermometer.c
См. документацию.
2{
3 private static float TIME_BETWEEN_UPDATE = 1;
4 private static float LIMIT_FOR_UPDATE_ALL_THERMOMETERS = 100;
6 private static int m_LastCheckIndex;
7 private static float m_TimeToUpdate;
8 //How many thermomethers will be set per update.
9 private static int m_NumUpdate = 1;
10
11 static void Init()
12 {
16 }
17
18 static void Cleanup()
19 {
20 m_Thermometers = null;
22 }
23
24 static void Add(OutdoorThermometer thermometer)
25 {
27 {
28 m_Thermometers.Insert(thermometer);
29
31 }
32 }
33
34 static void Remove(OutdoorThermometer thermometer)
35 {
37 {
38 m_Thermometers.RemoveItem(thermometer);
39
41 }
42 }
43
44 static void Update(float timeslice)
45 {
46 int count = m_Thermometers.Count();
47 if (count)
48 {
49 if (m_TimeToUpdate < 0)
50 {
51 for (int i = 0; i < m_NumUpdate; i++)
52 {
53 if (m_LastCheckIndex >= count)
55
56 m_Thermometers[m_LastCheckIndex].UpdateTemperature();
58 }
59
61 }
62 else
63 m_TimeToUpdate -= timeslice;
64 }
65 }
66}
67
69{
70 protected float m_MaxValue = 50;
71 protected float m_MinValue = -20;
72
79
84
86 {
87 float temperature = g_Game.GetMission().GetWorldData().GetTemperature(this, EEnvironmentTemperatureComponent.ALTITUDE|EEnvironmentTemperatureComponent.OVERCAST|EEnvironmentTemperatureComponent.FOG);
88 float temperature01 = (temperature - m_MinValue) / (m_MaxValue - m_MinValue);
89
90 temperature01 = Math.Clamp(temperature01, 0.0, 1.0);
91
92 SetAnimationPhase("ThermoGauge", temperature01);
93 }
94
95 private void LateInit()
96 {
99 }
100}
101
103{
105 {
106 m_MinValue = -40.0;
107 m_MaxValue = 50.0;
108 }
109}
110
112{
115 m_MinValue = -30.0;
116 m_MaxValue = 50;
117 }
118}
119
121{
123 {
124 m_MinValue = -35.0;
125 m_MaxValue = 55.0;
126 }
127}
128
129class Land_OutsideThermometer_2_wall : Land_OutsideThermometer_2
130{
131}
DayZGame g_Game
Определения DayZGame.c:3868
EEnvironmentTemperatureComponent
void ~OutdoorThermometer()
Определения OutdoorThermometer.c:80
void UpdateTemperature()
Определения OutdoorThermometer.c:85
Land_OutsideThermometer OutdoorThermometer Land_OutsideThermometer_1()
Определения OutdoorThermometer.c:113
float m_MinValue
Определения OutdoorThermometer.c:71
void LateInit()
Определения OutdoorThermometer.c:95
class OutdoorThermometerManager m_MaxValue
void OutdoorThermometer()
Определения OutdoorThermometer.c:73
class PlayerStatBase m_MinValue
T m_MaxValue
Определения PlayerStatBase.c:35
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
proto native bool RegisterNetworkStaticObject(Object object)
Static objects cannot be replicated by default (there are too many objects on the map)....
Определения CrashBase.c:2
void Land_OutsideThermometer_2()
Определения OutdoorThermometer.c:122
void Land_OutsideThermometer()
Определения OutdoorThermometer.c:104
Определения EnMath.c:7
static ref array< OutdoorThermometer > m_Thermometers
Определения OutdoorThermometer.c:5
static void Init()
Определения OutdoorThermometer.c:11
static float TIME_BETWEEN_UPDATE
Определения OutdoorThermometer.c:3
static void Update(float timeslice)
Определения OutdoorThermometer.c:44
static int m_LastCheckIndex
Определения OutdoorThermometer.c:6
static void Cleanup()
Определения OutdoorThermometer.c:18
static void Add(OutdoorThermometer thermometer)
Определения OutdoorThermometer.c:24
static float m_TimeToUpdate
Определения OutdoorThermometer.c:7
static void Remove(OutdoorThermometer thermometer)
Определения OutdoorThermometer.c:34
static int m_NumUpdate
Определения OutdoorThermometer.c:9
static float LIMIT_FOR_UPDATE_ALL_THERMOMETERS
Определения OutdoorThermometer.c:4
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float Ceil(float f)
Returns ceil of value.
const int CALL_CATEGORY_SYSTEM
Определения tools.c:8