Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        int GetTotalCost(float addNum)
        {
            ShopInfo info = ShopInfo.TryGet(m_idx.ToString());

            return((int)((1 + addNum) * info.costgold));
        }