コード例 #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;
     }
 }
コード例 #2
0
ファイル: LNButton.cs プロジェクト: 207h2Flogintvg/LGame
		public void SetActionCallBack(LNCallFunc.Callback ac) {
			ActionCallBack = ac;
		}