DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionPushObject.c

См. исходные тексты.

Структуры данных

class  ActionPushObjectDataReceiveData
 
class  CAContinuousRepeatPushObject
 
class  ActionPushObject
 

Функции

override void CreateActionComponent ()
 
override void ProgressActionComponent ()
 
override void EndActionComponent ()
 
void ApplyForce (ActionPushObjectData actionData)
 

Переменные

ActionPushObjectDataReceiveData m_NeedUpdate
 
int m_EndType = 0
 
vector m_Origin = "0 0 0"
 
Object m_Object
 
CAContinuousRepeatPushObject PUSH_FORCE_INCREMENT = 3000.0
 
ActionPushObjectData m_ActionDataPushObject
 

Функции

◆ ApplyForce()

void ApplyForce ( ActionPushObjectData actionData)
protected
97 {
98 Object entity = actionData.m_Object;
99
101 float invBodyMass = 1.0 / bodyMass;
103 float easedProgress = Easing.EaseInOutSine(actionData.m_ActionComponent.GetProgress());
104
105 vector impulse = force * actionData.m_Player.GetDirection() * invBodyMass * easedProgress;
106
107 actionData.m_Player.DepleteStamina(EStaminaModifiers.PUSH_CAR);
108
110 }
CAContinuousRepeatPushObject PUSH_FORCE_INCREMENT
EStaminaModifiers
Definition EStaminaModifiers.c:2
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
Definition Easing.c:3
static float EaseInOutSine(float t)
Definition Easing.c:14
Definition ObjectTyped.c:2
Definition EntityAI.c:95
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110
proto void dBodyApplyImpulseAt(notnull IEntity body, vector impulse, vector pos)
Applies impuls on a pos position in world coordinates.
proto native float dBodyGetMass(notnull IEntity ent)

Перекрестные ссылки dBodyApplyImpulseAt(), dBodyGetMass(), Easing::EaseInOutSine(), PUSH_FORCE_INCREMENT и vector::Zero.

◆ CreateActionComponent()

override void CreateActionComponent ( )
protected
53 {
54 m_ActionData.m_ActionComponent = new CAContinuousRepeatPushObject(10);
55 }
Definition ActionPushObject.c:16

◆ EndActionComponent()

override void EndActionComponent ( )
protected
66 {
67 m_ActionDataPushObject = ActionPushObjectData.Cast(m_ActionData);
68
70 {
71 super.EndActionComponent();
72 return;
73 }
74
76 {
77 if (m_ActionDataPushObject.m_EndType == 1)
78 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
79 else if (m_ActionDataPushObject.m_EndType == 0)
80 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
81 }
82 else if (m_ActionDataPushObject.m_State == UA_CANCEL)
83 {
85 if (action.HasAlternativeInterrupt())
86 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
87 else
88 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
89
90 return;
91 }
92
94 }
ActionPushObjectData m_ActionDataPushObject
Definition ActionPushObject.c:50
Definition ActionContinuousBase.c:121
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
const int UA_FINISHED
Definition constants.c:443
const int UA_CANCEL
Definition constants.c:444

Перекрестные ссылки m_ActionDataPushObject, UA_CANCEL и UA_FINISHED.

◆ ProgressActionComponent()

override void ProgressActionComponent ( )
protected
58 {
59 super.ProgressActionComponent();
60
61 ActionPushObjectData data = ActionPushObjectData.Cast(m_ActionData);
63 }
void ApplyForce(ActionPushObjectData actionData)
Definition ActionPushObject.c:96

Перекрестные ссылки ApplyForce().

Переменные

◆ m_ActionDataPushObject

ActionPushObjectData m_ActionDataPushObject
protected

Используется в EndActionComponent().

◆ m_EndType

int m_EndType = 0

◆ m_NeedUpdate

◆ m_Object

Object m_Object

Используется в GetObject().

◆ m_Origin

vector m_Origin = "0 0 0"

◆ PUSH_FORCE_INCREMENT

CAContinuousRepeatPushObject PUSH_FORCE_INCREMENT = 3000.0

Используется в ApplyForce().