private void OnCardComClick(EventContext context) { CardCom cardCom = context.sender as CardCom; CharModel.Inst.AddCollectCard(cardCom.GetCardInstance()); //todo 播放获得动画 CloseSelf(); }
private void OnTouchMove(EventContext context) { if (GRoot.inst.touchTarget is CardCom) { CardCom holdCard = GRoot.inst.touchTarget as CardCom; if (_lastHoldCard == holdCard) { return; } if (_lastHoldCard != null) { _lastHoldCard.SetHoldNormal(false); } holdCard.SetHoldNormal(true); _lastHoldCard = holdCard; return; } if (_lastHoldCard != null) { _lastHoldCard.SetHoldNormal(false); _lastHoldCard = null; } }