Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
hitdirectionspike.c
Go to the documentation of this file.
1 
2 class HitDirectionEffectSpike extends HitDirectionEffectBase
3 {
4  override HitDirectionImagesBase GetImageData()
5  {
6  typename type = HitDirectionImagesSpike;
7  HitDirectionImagesSpike data = HitDirectionImagesSpike.Cast(type.Spawn());
8  return data;
9  }
10 
11  override void FinalizePositionCalculation()
12  {
13  //blobs move around the edges, the rest on elypsis
14  float distance_x = (m_DistanceAdjust * m_SizeXEnf) + (m_SizeXEnf / 2.5);
15  float distance_y = (m_DistanceAdjust * m_SizeYEnf) + (m_SizeYEnf / 2.5);
16  m_PosX = Math.Sin(m_AngleRad) * distance_x;
17  m_PosY = -Math.Cos(m_AngleRad) * distance_y;
18  }
19 
20  override void SetIndicatorRotation(float timeslice = -1.0)
21  {
22  if (m_RotationOverride == HitDirectionConstants.ROTATION_DEFAULT)
23  {
24  m_LayoutRoot.SetRotation(0,0,Math.RAD2DEG * m_AngleRad,true);
25  }
26  else
27  {
28  m_LayoutRoot.SetRotation(0,0,m_RotationOverride,true);
29  }
30  }
31 }
HitDirectionImagesBase
Definition: hitdirectionimagesbase.c:2
HitDirectionEffectBase
Definition: hitdirectionarrow.c:2
Math
Definition: enmath.c:6