10 XComboBoxWidget m_DeathTypeCB;
12 ButtonWidget m_DeathStartButton;
14 XComboBoxWidget m_HitTypeCB;
15 ButtonWidget m_HitStartButton;
17 XComboBoxWidget m_UnconTypeCB;
18 ButtonWidget m_UnconStartButton;
19 ButtonWidget m_UnconEndButton;
22 bool m_CH_DeathStart =
false;
23 bool m_CH_HitStart =
false;
24 bool m_CH_UnconStart =
false;
25 bool m_CH_UnconEnd =
false;
34 CreateModuleWidgets();
40 DestroyModuleWidgets();
44 void CreateModuleWidgets()
46 m_DeathTypeCB = XComboBoxWidget.Cast(
m_MainWnd.FindAnyWidget(
"DeathTypeCB") );
48 m_DeathStartButton = ButtonWidget.Cast(
m_MainWnd.FindAnyWidget(
"DeathStartButton") );
50 m_HitTypeCB = XComboBoxWidget.Cast(
m_MainWnd.FindAnyWidget(
"HitTypeCB") );
51 m_HitStartButton = ButtonWidget.Cast(
m_MainWnd.FindAnyWidget(
"HitStartButton") );
53 m_UnconTypeCB = XComboBoxWidget.Cast(
m_MainWnd.FindAnyWidget(
"UnconTypeCB") );
54 m_UnconStartButton = ButtonWidget.Cast(
m_MainWnd.FindAnyWidget(
"UnconStartButton") );
55 m_UnconEndButton = ButtonWidget.Cast(
m_MainWnd.FindAnyWidget(
"UnconEndButton") );
58 void DestroyModuleWidgets()
66 bool OnClick(
Widget w,
int x,
int y,
int button)
68 if( w == m_DeathStartButton )
70 Print(
"PluginPlayerDebug: Death Start");
71 m_CH_DeathStart =
true;
74 else if( w == m_HitStartButton )
76 Print(
"PluginPlayerDebug: Uncon Start");
80 else if( w == m_UnconStartButton )
82 Print(
"PluginPlayerDebug: Uncon Start");
83 m_CH_UnconStart =
true;
86 else if( w == m_UnconEndButton )
88 Print(
"PluginPlayerDebug: Uncon End");
100 void CommandHandler()
102 if( m_CH_DeathStart )
105 m_CH_DeathStart =
false;
110 m_CH_HitStart =
false;
112 if( m_CH_UnconStart )
115 m_CH_UnconStart =
false;
120 m_CH_UnconEnd =
false;
133 int deathType = m_DeathTypeCB.GetCurrentItem();
137 float deathDirection = m_DeathDirectionEdit.GetText().ToInt();
149 float hitDirection = m_DeathDirectionEdit.GetText().ToInt();
150 int hitType = m_HitTypeCB.GetCurrentItem();
153 player.AddCommandModifier_Damage(0, hitDirection);
157 player.StartCommand_Damage(0, hitDirection);
167 int type = m_UnconTypeCB.GetCurrentItem();
169 player.m_UnconsciousDebug =
true;
170 player.StartCommand_Unconscious(type);
179 player.m_UnconsciousDebug =
false;