DayZ
1.24
Loading...
Searching...
No Matches
HitDirectionImagesBase.c
Go to the documentation of this file.
1
2
class
HitDirectionImagesBase
3
{
4
int
m_ImageIndex
;
5
6
void
HitDirectionImagesBase
()
7
{
8
if
((!
GetTypeLayoutPathArray
() && !
GetTypeImagePathArray
()))
9
PerformRegisterImages
();
10
11
RandomizeImageIdx
();
12
}
13
14
protected
void
PerformRegisterImages
()
15
{
16
/*
17
RegisterImage("gui/layouts/gameplay/HitDirectionIndication.layout","Single_indicator_Splash_1");
18
RegisterImage("gui/layouts/gameplay/HitDirectionIndication.layout","Single_indicator_Splash_2");
19
...
20
*/
21
}
22
23
protected
void
RegisterImage
(
string
layout_path
,
string
image_name
)
24
{
25
GetTypeLayoutPathArray
().Insert(
layout_path
);
26
GetTypeImagePathArray
().Insert(
image_name
);
27
}
28
29
protected
void
RandomizeImageIdx
()
30
{
31
m_ImageIndex
=
Math
.
RandomIntInclusive
(0,
GetTypeImagePathArray
().
Count
() - 1);
32
}
33
34
protected
array<string>
GetTypeLayoutPathArray
() {}
35
protected
array<string>
GetTypeImagePathArray
() {}
36
38
void
GetCurrentImageData
(
out
Widget
layout
,
out
Widget
image
)
39
{
40
layout
=
GetGame
().GetWorkspace().CreateWidgets(
GetTypeLayoutPathArray
()[
m_ImageIndex
]);
41
image
=
layout
.FindAnyWidget(
GetTypeImagePathArray
()[
m_ImageIndex
]);
42
}
43
}
Count
@ Count
Definition
RandomGeneratorSyncManager.c:7
HitDirectionImagesBase
Definition
HitDirectionImagesBase.c:3
HitDirectionImagesBase::GetTypeLayoutPathArray
array< string > GetTypeLayoutPathArray()
Definition
HitDirectionImagesBase.c:34
HitDirectionImagesBase::RandomizeImageIdx
void RandomizeImageIdx()
Definition
HitDirectionImagesBase.c:29
HitDirectionImagesBase::GetTypeImagePathArray
array< string > GetTypeImagePathArray()
Definition
HitDirectionImagesBase.c:35
HitDirectionImagesBase::GetCurrentImageData
void GetCurrentImageData(out Widget layout, out Widget image)
Layout should be sufficient for generic manipulation of the hit image.
Definition
HitDirectionImagesBase.c:38
HitDirectionImagesBase::HitDirectionImagesBase
void HitDirectionImagesBase()
Definition
HitDirectionImagesBase.c:6
HitDirectionImagesBase::m_ImageIndex
int m_ImageIndex
Definition
HitDirectionImagesBase.c:4
HitDirectionImagesBase::RegisterImage
void RegisterImage(string layout_path, string image_name)
Definition
HitDirectionImagesBase.c:23
HitDirectionImagesBase::PerformRegisterImages
void PerformRegisterImages()
Definition
HitDirectionImagesBase.c:14
Math
Definition
EnMath.c:7
Param3
Definition
EntityAI.c:95
Widget
Definition
EnWidgets.c:190
GetGame
proto native CGame GetGame()
Math::RandomIntInclusive
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition
EnMath.c:54
scripts
4_World
Classes
HitIndication
HitDirectionImages
HitDirectionImagesBase.c
Generated by
1.10.0