static public T ProcessLockSection <T>(this GamepadBase item, GamepadComponentId component, InputAtomLock @lock, Operation <T> operation)
        {
            T to_return = default(T);

            item.ProcessLockSection(component, @lock, delegate() {
                to_return = operation();
            });

            return(to_return);
        }
Ejemplo n.º 2
0
 public GamepadComponent GetComponent(GamepadComponentId id)
 {
     return(components.GetValue(id));
 }
 static public void ExitLockSection(this GamepadBase item, GamepadComponentId component, InputAtomLock @lock)
 {
     item.GetComponent(component).ExitLockSection(@lock);
 }
 static public void ProcessLockSection(this GamepadBase item, GamepadComponentId component, InputAtomLock @lock, Process process)
 {
     item.EnterLockSection(component, @lock);
     process();
     item.ExitLockSection(component, @lock);
 }
Ejemplo n.º 5
0
 public GamepadComponent(GamepadComponentId i, InputAtomLockType l = InputAtomLockType.Zeroed)
 {
     id        = i;
     lock_type = l;
 }