DayZ
1.24
Loading...
Searching...
No Matches
HitDirectionArrow.c
Go to the documentation of this file.
1
2
class
HitDirectionEffectArrow
extends
HitDirectionEffectBase
3
{
4
override
HitDirectionImagesBase
GetImageData
()
5
{
6
typename
type =
HitDirectionImagesArrow
;
7
HitDirectionImagesArrow
data
=
HitDirectionImagesArrow
.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
m_LayoutRoot.SetRotation(0, 0,
Math
.
RAD2DEG
* m_AngleRad,
true
);
24
else
25
m_LayoutRoot.SetRotation(0, 0, m_RotationOverride,
true
);
26
}
27
}
HitDirectionEffectBase
Definition
HitDirectionArrow.c:3
HitDirectionEffectBase::GetImageData
override HitDirectionImagesBase GetImageData()
Definition
HitDirectionArrow.c:4
HitDirectionEffectBase::FinalizePositionCalculation
override void FinalizePositionCalculation()
Definition
HitDirectionArrow.c:11
HitDirectionEffectBase::SetIndicatorRotation
override void SetIndicatorRotation(float timeslice=-1.0)
Definition
HitDirectionArrow.c:20
HitDirectionImagesBase
Definition
HitDirectionImagesBase.c:3
Math
Definition
EnMath.c:7
Param3
Definition
EntityAI.c:95
Math::Cos
static proto float Cos(float angle)
Returns cosinus of angle in radians.
Math::Sin
static proto float Sin(float angle)
Returns sinus of angle in radians.
Math::RAD2DEG
static const float RAD2DEG
Definition
EnMath.c:16
scripts
4_World
Classes
HitIndication
HitDirectionArrow.c
Generated by
1.10.0