3 protected string m_NameScene;
4 protected string m_NameMission;
5 protected float m_InitTime;
6 protected int m_DateInitYear;
7 protected int m_DateInitMonth;
8 protected int m_DateInitDay;
9 protected int m_DateInitHour;
10 protected int m_DateInitMinute;
11 protected float m_WeaterInitOvercast;
12 protected float m_WeaterInitRain;
13 protected float m_WeaterInitFog;
14 protected float m_WeaterInitWindForce;
56 foreach (
auto p: scene_players)
61 foreach (
auto o: scene_object)
82 void SetNameScene(
string name)
90 string GetNameMission()
98 void SetNameMission(
string name)
100 m_NameMission =
name;
114 void SetInitTime(
float time)
125 return m_DateInitYear;
131 void SetInitYear(
int value)
133 m_DateInitYear = value;
134 GetGame().GetWorld().SetDate( m_DateInitYear, m_DateInitMonth, m_DateInitDay, m_DateInitHour, m_DateInitMinute );
142 return m_DateInitMonth;
148 void SetInitMonth(
int value)
150 m_DateInitMonth = value;
151 GetGame().GetWorld().SetDate( m_DateInitYear, m_DateInitMonth, m_DateInitDay, m_DateInitHour, m_DateInitMinute );
159 return m_DateInitDay;
165 void SetInitDay(
int value)
167 m_DateInitDay = value;
168 GetGame().GetWorld().SetDate( m_DateInitYear, m_DateInitMonth, m_DateInitDay, m_DateInitHour, m_DateInitMinute );
176 return m_DateInitHour;
182 void SetInitHour(
int value)
184 m_DateInitHour = value;
185 GetGame().GetWorld().SetDate( m_DateInitYear, m_DateInitMonth, m_DateInitDay, m_DateInitHour, m_DateInitMinute );
193 return m_DateInitMinute;
199 void SetInitMinute(
int value)
201 m_DateInitMinute = value;
202 GetGame().GetWorld().SetDate( m_DateInitYear, m_DateInitMonth, m_DateInitDay, m_DateInitHour, m_DateInitMinute );
208 float GetInitOvercast()
210 return m_WeaterInitOvercast;
216 void SetInitOvercast(
float value)
218 m_WeaterInitOvercast = value;
219 GetGame().GetWeather().GetOvercast().Set( value, 0, 1000 );
227 return m_WeaterInitRain;
233 void SetInitRain(
float value)
235 m_WeaterInitRain = value;
236 GetGame().GetWeather().GetRain().Set( value, 0, 1000 );
244 return m_WeaterInitFog;
250 void SetInitFog(
float value)
252 m_WeaterInitFog = value;
253 GetGame().GetWeather().GetFog().Set( value, 0, 1000 );
259 float GetInitWindForce()
261 return m_WeaterInitWindForce;
267 void SetInitWindForce(
float value)
272 m_WeaterInitWindForce = value;
276 m_WeaterInitWindForce = 0.1;
279 GetGame().GetWeather().SetWindSpeed( m_WeaterInitWindForce );
288 sc_obj.Init(obj_name, pos);
290 if ( sc_obj != NULL )
292 m_Objects.Insert(sc_obj);
303 ScenePlayer CreateScenePlayer()
305 ScenePlayer sc_ply =
new ScenePlayer();
308 m_Players.Insert(sc_ply);
329 sc_obj.Init(
"player", e.GetPosition());
331 sc_obj.LinkEntityAI( e );
333 if ( sc_obj.IsPlayer() )
335 m_Players.Insert( ScenePlayer.Cast( sc_obj ) );
339 m_Objects.Insert( sc_obj );
350 for (
int i = 0; i < m_Players.Count(); ++i )
352 EntityAI ply = m_Players.Get(i).GetObject();
354 if ( ply != NULL && ply == e )
356 return m_Players.Get(i);
360 for (
int j = 0; j < m_Objects.Count(); ++j )
362 EntityAI obj = m_Objects.Get(j).GetObject();
364 if ( obj != NULL && obj == e )
366 return m_Objects.Get(j);
378 int index_p = m_Players.Find( ScenePlayer.Cast( scene_object ) );
382 m_Players.Remove(index_p);
386 int index_o = m_Objects.Find(scene_object);
390 m_Objects.Remove(index_o);