DayZ 1.24
Loading...
Searching...
No Matches
ArrowManagerBase Class Reference
Inheritance diagram for ArrowManagerBase:
[legend]
Collaboration diagram for ArrowManagerBase:
[legend]

Protected Member Functions

void ArrowManagerBase (EntityAI owner)
 
void AddArrow (EntityAI arrow)
 
void RemoveArrow (EntityAI arrow)
 
void ClearArrows ()
 
int GetArrowsCount ()
 
void DropArrow (int index)
 
void DropFirstArrow ()
 
void DropAllArrows ()
 
EntityAI GetArrow (int index)
 
EntityAI GetFirstArrow ()
 
EntityAI AcquireFirstArrow (bool keepTransform=false)
 

Protected Attributes

const int VERSION = 2
 
ref array< EntityAIm_Arrows
 
EntityAI m_Owner
 

Detailed Description

Definition at line 1 of file ArrowManagerBase.c.

Constructor & Destructor Documentation

◆ ArrowManagerBase()

void ArrowManagerBase::ArrowManagerBase ( EntityAI owner)
inlineprotected

Definition at line 7 of file ArrowManagerBase.c.

8 {
11 }
ref array< EntityAI > m_Arrows

References m_Arrows, and m_Owner.

Member Function Documentation

◆ AcquireFirstArrow()

EntityAI ArrowManagerBase::AcquireFirstArrow ( bool keepTransform = false)
inlineprotected

Definition at line 86 of file ArrowManagerBase.c.

87 {
89 m_Owner.RemoveChild(entity, keepTransform);
90 return entity;
91 }
EntityAI GetFirstArrow()

References GetFirstArrow(), and m_Owner.

◆ AddArrow()

void ArrowManagerBase::AddArrow ( EntityAI arrow)
inlineprotected

Definition at line 13 of file ArrowManagerBase.c.

14 {
15 m_Arrows.Insert(arrow);
16 }

References m_Arrows.

◆ ClearArrows()

void ArrowManagerBase::ClearArrows ( )
inlineprotected

Definition at line 23 of file ArrowManagerBase.c.

24 {
25 foreach (EntityAI arrow : m_Arrows)
26 {
27 if (arrow)
28 arrow.DeleteSafe();
29 }
30
31 m_Arrows.Clear();
32 }

References m_Arrows.

◆ DropAllArrows()

void ArrowManagerBase::DropAllArrows ( )
inlineprotected

Definition at line 64 of file ArrowManagerBase.c.

65 {
66 for (int i = m_Arrows.Count() - 1; i >= 0 ; i--)
67 DropArrow(i);
68 }
void DropArrow(int index)

References DropArrow(), and m_Arrows.

◆ DropArrow()

void ArrowManagerBase::DropArrow ( int index)
inlineprotected

Definition at line 39 of file ArrowManagerBase.c.

40 {
41 if (m_Arrows.Count() > index)
42 {
44 vector pos = arrow.GetPosition();
45
46 m_Owner.RemoveChild(arrow);
47
48 vector m4[4];
50 m4[3] = pos;
51
52 arrow.PlaceOnSurfaceRotated(m4, pos);
53
54 arrow.SetTransform(m4);
55 arrow.PlaceOnSurface();
56 }
57 }
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Definition EnMath3D.c:233

References m_Arrows, m_Owner, and Math3D::MatrixIdentity4().

Referenced by DropAllArrows(), and DropFirstArrow().

◆ DropFirstArrow()

void ArrowManagerBase::DropFirstArrow ( )
inlineprotected

Definition at line 59 of file ArrowManagerBase.c.

60 {
61 DropArrow(0);
62 }

References DropArrow().

◆ GetArrow()

EntityAI ArrowManagerBase::GetArrow ( int index)
inlineprotected

Definition at line 70 of file ArrowManagerBase.c.

71 {
72 if (m_Arrows.Count() > index)
73 return m_Arrows.Get(index);
74
75 return null;
76 }

References m_Arrows.

◆ GetArrowsCount()

int ArrowManagerBase::GetArrowsCount ( )
inlineprotected

Definition at line 34 of file ArrowManagerBase.c.

35 {
36 return m_Arrows.Count();
37 }

References m_Arrows.

◆ GetFirstArrow()

EntityAI ArrowManagerBase::GetFirstArrow ( )
inlineprotected

Definition at line 78 of file ArrowManagerBase.c.

79 {
80 if (m_Arrows.Count())
81 return m_Arrows.Get(0);
82
83 return null;
84 }

References m_Arrows.

Referenced by AcquireFirstArrow().

◆ RemoveArrow()

void ArrowManagerBase::RemoveArrow ( EntityAI arrow)
inlineprotected

Definition at line 18 of file ArrowManagerBase.c.

19 {
20 m_Arrows.RemoveItem(arrow);
21 }

References m_Arrows.

Member Data Documentation

◆ m_Arrows

◆ m_Owner

EntityAI ArrowManagerBase::m_Owner
protected

◆ VERSION

const int ArrowManagerBase::VERSION = 2
protected

Definition at line 3 of file ArrowManagerBase.c.

Referenced by ArrowManagerPlayer::Save().


The documentation for this class was generated from the following file: