public override void Init(UIFormData data, object arg = null) { m_idx = (arg as int?) ?? 0; base.Init(data, arg); RectTransform warningRect = warning.transform as RectTransform; m_PunchAnim = warningRect.DOPunchScale(new Vector3(2, 2), 0.3f, 1); m_PunchAnim.Pause(); //m_PunchAnim.setAutoKill(false); m_PunchAnim.SetAutoKill(false); ShopInfo info = ShopInfo.TryGet(m_idx.ToString()); itemIcon.sprite = Resources.Load <Sprite>(info.icon); }
int GetTotalCost(float addNum) { ShopInfo info = ShopInfo.TryGet(m_idx.ToString()); return((int)((1 + addNum) * info.costgold)); }