Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_DestructionBaseData.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 {
4  // This integer is public as we don't want to have unnecessary getter & setter calls for it
5  int m_iNextFreeIndex = -1;
6  protected float m_fPreviousHealth;
7  protected ref SCR_DestructionHitInfo m_HitInfo;
8  protected ref ScriptInvoker m_OnDamage;
9  protected bool m_bDestructionQueued = false;
10 
11  //------------------------------------------------------------------------------------------------
12  void Reset()
13  {
14  m_fPreviousHealth = 0;
15  m_bDestructionQueued = false;
16  delete m_HitInfo;
17  delete m_OnDamage;
18  }
19 
20  //------------------------------------------------------------------------------------------------
21  void SetDestructionQueued(bool destructionQueued)
22  {
23  m_bDestructionQueued = destructionQueued;
24  }
25 
26  //------------------------------------------------------------------------------------------------
27  bool GetDestructionQueued()
28  {
29  return m_bDestructionQueued;
30  }
31 
32  //------------------------------------------------------------------------------------------------
33  float GetPreviousHealth()
34  {
35  return m_fPreviousHealth;
36  }
37 
38  //------------------------------------------------------------------------------------------------
39  void SetPreviousHealth(float previousHealth)
40  {
41  m_fPreviousHealth = previousHealth;
42  }
43 
44  //------------------------------------------------------------------------------------------------
45  void DeleteHitInfo()
46  {
47  SCR_DestructionHitInfo hitinfo = m_HitInfo;
48  m_HitInfo = null;
49  }
50 
51  //------------------------------------------------------------------------------------------------
52  SCR_DestructionHitInfo GetHitInfo(bool createNew = true)
53  {
54  if (!m_HitInfo && createNew)
55  m_HitInfo = new SCR_DestructionHitInfo();
56  return m_HitInfo;
57  }
58 
59  //------------------------------------------------------------------------------------------------
60  ScriptInvoker GetOnDamage(bool createNew = true)
61  {
62  if (!m_OnDamage && createNew)
63  m_OnDamage = new ScriptInvoker();
64  return m_OnDamage;
65  }
66 };
SCR_DestructionBaseData
Definition: SCR_DestructionBaseData.c:2