Elin Decompiled Documentation EA 23.291 Nightly Patch 1
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 212 of file EInput.cs.

Member Function Documentation

◆ Consume()

void EInput.KeyboardPress.Consume ( )
inline

Definition at line 254 of file EInput.cs.

255 {
256 consumed = true;
257 }

References EInput.KeyboardPress.consumed.

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

◆ Update()

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

Definition at line 226 of file EInput.cs.

227 {
228 if (Input.GetKey(func().key) || forcePress)
229 {
230 if (consumed)
231 {
232 return false;
233 }
234 if (count == 1)
235 {
236 timer += delta;
237 if (timer < 0.5f)
238 {
239 return false;
240 }
241 }
242 else
243 {
244 timer = 0f;
245 }
246 count++;
247 return true;
248 }
249 consumed = false;
250 count = 0;
251 return false;
252 }
Func< KeyMap > func
Definition: EInput.cs:220
static float delta
Definition: EInput.cs:332

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 218 of file EInput.cs.

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

◆ count

int EInput.KeyboardPress.count

Definition at line 216 of file EInput.cs.

Referenced by EInput.KeyboardPress.Update().

◆ func

Func<KeyMap> EInput.KeyboardPress.func

Definition at line 220 of file EInput.cs.

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

◆ timer

float EInput.KeyboardPress.timer

Definition at line 214 of file EInput.cs.

Referenced by EInput.KeyboardPress.Update().

Property Documentation

◆ Action

EAction EInput.KeyboardPress.Action
get

Definition at line 222 of file EInput.cs.

Referenced by EInput.GetAction().

◆ IsRepeating

bool EInput.KeyboardPress.IsRepeating
get

Definition at line 224 of file EInput.cs.

Referenced by AM_Adv._OnUpdateInput().


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