void OnEscapeClick() { //TODO 先处理Dialogs if (MorlnTooltip.IsShowing) { MorlnTooltip.ForceHide(); return; } if (AlertDialog.Instance) { AlertDialog.Instance.ProcessEscapeEvent(); return; } //再处理Panels for (var i = _baseTempSingletonPanels.Count - 1; i >= 0; i--) { if (_baseTempSingletonPanels[i].OnEscapeClick()) { return; } } //最后处理UIs foreach (var baseUI in _baseUIs.Where(x => x)) { if (baseUI.OnEscapeClick()) { return; } } }
void OnDoubleClick() { UMengPlugin.UMengEvent(!_worn ? EventId.EQUIP_WEAR : EventId.EQUIP_UNWEAR, new Dictionary <string, object> { { "code", _equip.EquipCode } }); //发送统计事件 var userCharacter = CommonData.MyCharacterList.Find(x => x.CharacterCode == EquipPanel.CurCharacterCode); if (userCharacter != null) { var worn = userCharacter.WearEquipList.Exists(x => x == _equip.EquipCode); Requester.Instance.Send(new UseEquip(EquipPanel.CurCharacterCode, _equip.EquipCode, !worn)); } MorlnTooltip.ForceHide();//竟然会触发两次OnClick,可以理解 }