Exemplo n.º 1
0
 public override void ProcessTouchReleased()
 {
     if (isPressed)
     {
         base.ProcessTouchReleased();
         float num = 0f;
         foreach (string str  in  this._buttonElement.Keys)
         {
             LNNode node = (LNNode)CollectionUtils.Get(this._buttonElement, str);
             node.StopAllAction();
             if (this._touchClickedAction.ContainsKey(str))
             {
                 num = MathUtils.Max(num, ((LNAction)CollectionUtils.Get(this._touchClickedAction, str))
                                     .GetDuration());
                 node.RunAction((LNAction)CollectionUtils.Get(this._touchClickedAction, str));
             }
         }
         if (ActionCallBack != null)
         {
             if (num > 0f)
             {
                 base.RunAction(LNSequence.Action(LNDelay.Action(num),
                                                  LNCallFunc.Action(ActionCallBack)));
             }
             else
             {
                 base.RunAction(LNCallFunc.Action(ActionCallBack));
             }
         }
         isPressed = false;
     }
 }
Exemplo n.º 2
0
		public void SetActionCallBack(LNCallFunc.Callback ac) {
			ActionCallBack = ac;
		}