DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionPushObject
+ Граф наследования:ActionPushObject:

Защищенные члены

Object GetPushObject (ActionTarget target)
 

Закрытые члены

override GetInputType ()
 
override void CreateConditionComponents ()
 
override bool HasAlternativeInterrupt ()
 
override ActionData CreateActionData ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnUpdate (ActionData action_data)
 
override void OnStart (ActionData action_data)
 
override void OnEndInput (ActionData action_data)
 
- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Подробное описание

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
139 {
140 if (!player.IsPlayerInStance(DayZPlayerConstants.STANCEMASK_ERECT|DayZPlayerConstants.STANCEMASK_CROUCH))
141 return false;
142
143 if (player.PhysicsGetLinkedEntity() == target.GetObject())
144 return false;
145
146 if (!player.GetSurfaceType())
147 return false;
148
149 if (!player.CanConsumeStamina(EStaminaConsumers.PUSH))
150 return false;
151
152 return true;
153 }
EStaminaConsumers
Definition EStaminaConsumers.c:2
Definition EntityAI.c:95
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprivate
133 {
134 ActionPushObjectData data = new ActionPushObjectData();
135 return data;
136 }

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
122 {
125 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINotPresent.c:2
Definition CCTCursorNoRuinCheck.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

Перекрестные ссылки UAMaxDistances::DEFAULT, ActionBase::m_ConditionItem и ActionBase::m_ConditionTarget.

◆ GetInputType()

override GetInputType ( )
inlineprivate
117 {
119 }
Definition ActionInput.c:522

◆ GetPushObject()

Object GetPushObject ( ActionTarget target)
inlineprotected
200 {
201 if (target.IsProxy())
202 return target.GetParent();
203
204 return target.GetObject();
205 }

Используется в ActionPushCar::GetCar() и OnStart().

◆ HasAlternativeInterrupt()

override bool HasAlternativeInterrupt ( )
inlineprivate
128 {
129 return true;
130 }

◆ OnEndInput()

override void OnEndInput ( ActionData action_data)
inlineprivate
190 {
191 super.OnEndInput(action_data);
192
193 ActionPushObjectData data = ActionPushObjectData.Cast(action_data);
194 data.m_State = UA_CANCEL;
195 data.m_EndType = 1;
196 data.m_NeedUpdate = false;
197 }
const int UA_CANCEL
Definition constants.c:444

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

◆ OnStart()

override void OnStart ( ActionData action_data)
inlineprivate
180 {
181 super.OnStart(action_data);
182
183 ActionPushObjectData data = ActionPushObjectData.Cast(action_data);
184 data.m_Object = GetPushObject(action_data.m_Target);
185 data.m_Origin = data.m_Object.GetPosition();
186 data.m_NeedUpdate = true;
187 }
Object GetPushObject(ActionTarget target)
Definition ActionPushObject.c:199

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

◆ OnUpdate()

override void OnUpdate ( ActionData action_data)
inlineprivate
156 {
157 super.OnUpdate(action_data);
158
159 ActionPushObjectData data = ActionPushObjectData.Cast(action_data);
160 if (data.m_NeedUpdate)
161 {
162 if (!data.m_Player.CanConsumeStamina(EStaminaConsumers.PUSH))
163 {
164 data.m_State = UA_CANCEL;
165 data.m_NeedUpdate = false;
166
167 return;
168 }
169
170 if (vector.Distance(data.m_Object.GetPosition(), data.m_Origin) > 0.5)
171 {
172 data.m_State = UA_FINISHED;
173 data.m_EndType = 0;
174 data.m_NeedUpdate = false;
175 }
176 }
177 }
Definition EnConvert.c:106
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
const int UA_FINISHED
Definition constants.c:443

Перекрестные ссылки vector::Distance(), UA_CANCEL и UA_FINISHED.


Объявления и описания членов класса находятся в файле: