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

Protected Member Functions

void StanceIndicator (PlayerBase player)
 
void Update ()
 
void DisplayStance (int stance)
 

Protected Attributes

ref HumanMovementState m_State
 
PlayerBase m_Player
 

Detailed Description

Definition at line 1 of file StanceIndicator.c.

Constructor & Destructor Documentation

◆ StanceIndicator()

void StanceIndicator::StanceIndicator ( PlayerBase player)
inlineprotected

Definition at line 6 of file StanceIndicator.c.

7 {
10 }
PlayerBase m_Player
ref HumanMovementState m_State

References m_Player, and m_State.

Member Function Documentation

◆ DisplayStance()

void StanceIndicator::DisplayStance ( int stance)
inlineprotected

Definition at line 30 of file StanceIndicator.c.

31 {
32 if (m_Player)
33 {
34 DisplayElementBase stance_element = m_Player.GetVirtualHud().GetElement(eDisplayElements.DELM_STANCE);
36 stance_element.SetValue(stance);
37 //m_Player.GetVirtualHud().SetValue(eDisplayElements.DELM_STANCE, stance);
38 }
39 }

References m_Player.

Referenced by Update().

◆ Update()

void StanceIndicator::Update ( )
inlineprotected

Definition at line 12 of file StanceIndicator.c.

13 {
14 if (m_Player)
15 {
16 m_Player.GetMovementState(m_State);
17 int player_stance = m_State.m_iStanceIdx;
18 int hud_stance_id = 1;
19 //if ( player_stance == DayZPlayerConstants.STANCEIDX_ERECT || player_stance == DayZPlayerConstants.STANCEIDX_RAISEDERECT) hud_stance_id = 1;
20 if (player_stance == DayZPlayerConstants.STANCEIDX_CROUCH || player_stance == DayZPlayerConstants.STANCEIDX_RAISEDCROUCH)
21 hud_stance_id = 2;
22 if (player_stance == DayZPlayerConstants.STANCEIDX_PRONE || player_stance == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
23 hud_stance_id = 3;
25 //Debug
26 //m_Player.MessageStatus(ToString(player) + "StanceIndicator.c || stance: " + ToString(player_stance));
27 }
28 }
void DisplayStance(int stance)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References DisplayStance(), m_Player, and m_State.

Member Data Documentation

◆ m_Player

PlayerBase StanceIndicator::m_Player
protected

Definition at line 4 of file StanceIndicator.c.

Referenced by DisplayStance(), StanceIndicator(), and Update().

◆ m_State

ref HumanMovementState StanceIndicator::m_State
protected

Definition at line 3 of file StanceIndicator.c.

Referenced by StanceIndicator(), and Update().


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