Beispiel #1
0
 public static void Clear()
 {
     EventRegistry.SendEvent(BLOCK_UI, new BlockInfo()
     {
         key = null, visible = false
     });
 }
Beispiel #2
0
 public static void Show(object k)
 {
     EventRegistry.SendEvent(BLOCK_UI, new BlockInfo()
     {
         key = k, visible = true
     });
 }
Beispiel #3
0
 public static void Hide(object k)
 {
     EventRegistry.SendEvent(BLOCK_UI, new BlockInfo()
     {
         key = k, visible = false
     });
 }
Beispiel #4
0
 void OnSelect(bool selected)
 {
     if (selected)
     {
         EventRegistry.SendEvent(onSelect, this);
     }
     else
     {
         EventRegistry.SendEvent(onDeselect, this);
     }
 }
Beispiel #5
0
 void Update()
 {
     acceleration      = Input.acceleration;
     lowPassValue      = Vector3.Lerp(lowPassValue, acceleration, lowPassFilterFactor);
     deltaAcceleration = acceleration - lowPassValue;
     if (deltaAcceleration.sqrMagnitude >= shakeDetectionThreshold)
     {
         // Perform your "shaking actions" here, with suitable guards in the if check above, if necessary to not, to not fire again if they're already being performed.
         EventRegistry.SendEvent("device.shake", null);
     }
 }
Beispiel #6
0
 void OnPress(bool pressed)
 {
     if (pressed)
     {
         EventRegistry.SendEvent(onPress, this);
     }
     else
     {
         EventRegistry.SendEvent(onRelease, this);
     }
 }
Beispiel #7
0
 void OnHover(bool isOver)
 {
     if (isOver)
     {
         EventRegistry.SendEvent(onHoverOver, this);
     }
     else
     {
         EventRegistry.SendEvent(onHoverOut, this);
     }
 }
Beispiel #8
0
 void OnDragOut(GameObject go)
 {
     EventRegistry.SendEvent(onDragOut, this);
 }
Beispiel #9
0
 void OnDoubleClick()
 {
     EventRegistry.SendEvent(onDoubleClick, this);
 }
Beispiel #10
0
 void OnClick()
 {
     EventRegistry.SendEvent(onClick, this);
 }