DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionSetKitchenTimer.c
См. документацию.
2{
3 const float TIME_TO_COMPLETE = 24.0;
4
5 override void CreateActionComponent()
6 {
7 m_ActionData.m_ActionComponent = new CAContinuousRepeat(TIME_TO_COMPLETE);
8 KitchenTimer clock = KitchenTimer.Cast(m_ActionData.m_MainItem);
9 CAContinuousRepeat.Cast(m_ActionData.m_ActionComponent).SetProgress(clock.GetAnimationPhase("ClockAlarm") * TIME_TO_COMPLETE);
10 }
11};
12
14{
16 {
17 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_SET_KITCHENTIMER;
18 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONMOD_SET_KITCHENTIMER;
20
22 m_Text = "#STR_SetTimer0";
23 }
24
30
31 override bool HasProneException()
32 {
33 return true;
34 }
35
36 override bool HasTarget()
37 {
38 return false;
39 }
40
41
42 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
43 {
44 return true;
45 }
46
47 override void OnEndServer(ActionData action_data)
48 {
49 super.OnEndServer(action_data);
50
51 float progress = action_data.m_Callback.GetActionComponentProgress();
52 KitchenTimer clock = KitchenTimer.Cast(action_data.m_MainItem);
53 clock.SetAlarmTimeServer(progress);
54 }
55
56 override void OnEndAnimationLoopServer( ActionData action_data )
57 {
58
59 }
60
61 override void OnUpdate(ActionData action_data)
62 {
63 float progress = action_data.m_Callback.GetActionComponentProgress();
64 KitchenTimer clock = KitchenTimer.Cast(action_data.m_MainItem);
65 clock.SetAnimationPhaseNow("ClockAlarm", progress);
66 }
67
68};
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
float m_SpecialtyWeight
Определения ActionBase.c:77
string m_Text
Определения ActionBase.c:58
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
ref CCTBase m_ConditionTarget
Определения ActionBase.c:65
ActionData m_ActionData
Определения AnimatedActionBase.c:3
void ActionContinuousBase()
Определения ActionContinuousBase.c:124
void ActionSetKitchenTimer()
Определения ActionSetKitchenTimer.c:15
override void OnEndAnimationLoopServer(ActionData action_data)
Определения ActionSetKitchenTimer.c:56
override bool HasProneException()
Определения ActionSetKitchenTimer.c:31
override void OnUpdate(ActionData action_data)
Определения ActionSetKitchenTimer.c:61
override bool HasTarget()
Определения ActionSetKitchenTimer.c:36
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionSetKitchenTimer.c:42
override void OnEndServer(ActionData action_data)
Определения ActionSetKitchenTimer.c:47
override void CreateConditionComponents()
Определения ActionSetKitchenTimer.c:25
override void CreateActionComponent()
Определения ActionSetKitchenTimer.c:5
const float TIME_TO_COMPLETE
Определения ActionSetKitchenTimer.c:3
int m_CommandUID
Определения AnimatedActionBase.c:143
int m_CommandUIDProne
Определения AnimatedActionBase.c:144
void SetProgress(float value)
Определения CAContinuousRepeat.c:68
Определения CCINonRuined.c:2
Определения CCTSelf.c:2
Определения InventoryItem.c:731
override void SetAlarmTimeServer(float time01)
Определения KitchenTimer.c:198
Определения KitchenTimer.c:2
Определения PlayerBaseClient.c:2
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602