Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
EInput.KeyboardPress Class Reference

Public Member Functions

bool Update (bool forcePress=false)
 
void Consume ()
 

Public Attributes

float timer
 
int count
 
bool consumed
 
Func< KeyMapfunc
 

Properties

EAction Action [get]
 
bool IsRepeating [get]
 

Detailed Description

Definition at line 201 of file EInput.cs.

Member Function Documentation

◆ Consume()

void EInput.KeyboardPress.Consume ( )
inline

Definition at line 243 of file EInput.cs.

244 {
245 consumed = true;
246 }

References EInput.KeyboardPress.consumed.

Referenced by AM_Adv._OnUpdateInput(), and Scene.Init().

◆ Update()

bool EInput.KeyboardPress.Update ( bool  forcePress = false)
inline

Definition at line 215 of file EInput.cs.

216 {
217 if (Input.GetKey(func().key) || forcePress)
218 {
219 if (consumed)
220 {
221 return false;
222 }
223 if (count == 1)
224 {
225 timer += delta;
226 if (timer < 0.5f)
227 {
228 return false;
229 }
230 }
231 else
232 {
233 timer = 0f;
234 }
235 count++;
236 return true;
237 }
238 consumed = false;
239 count = 0;
240 return false;
241 }
Func< KeyMap > func
Definition: EInput.cs:209
static float delta
Definition: EInput.cs:321

References EInput.KeyboardPress.consumed, EInput.KeyboardPress.count, EInput.delta, EInput.KeyboardPress.func, and EInput.KeyboardPress.timer.

Referenced by ActionMode.DoFunc(), and EInput.GetAction().

Member Data Documentation

◆ consumed

bool EInput.KeyboardPress.consumed

Definition at line 207 of file EInput.cs.

Referenced by EInput.KeyboardPress.Consume(), and EInput.KeyboardPress.Update().

◆ count

int EInput.KeyboardPress.count

Definition at line 205 of file EInput.cs.

Referenced by EInput.KeyboardPress.Update().

◆ func

Func<KeyMap> EInput.KeyboardPress.func

Definition at line 209 of file EInput.cs.

Referenced by EInput.SetKeyMap(), and EInput.KeyboardPress.Update().

◆ timer

float EInput.KeyboardPress.timer

Definition at line 203 of file EInput.cs.

Referenced by EInput.KeyboardPress.Update().

Property Documentation

◆ Action

EAction EInput.KeyboardPress.Action
get

Definition at line 211 of file EInput.cs.

Referenced by EInput.GetAction().

◆ IsRepeating

bool EInput.KeyboardPress.IsRepeating
get

Definition at line 213 of file EInput.cs.

Referenced by AM_Adv._OnUpdateInput().


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