wangguan
2020-12-23 aadfae81e6a511cd2c062ab0b05f3ee3419f1a7f
Assets/Scripts/TowerDefense/UI/EndlessSettlementPropList.cs
@@ -22,7 +22,7 @@
        private string iconPath = "UI/Props/";
        private string bgPath = "UI/Props/Di/";
        private float slowTime = 0.3f;//物品挨个出现频率
        private float slowTime = 0.1f;//物品挨个出现频率
        //private float parentHeight;//父物体高度
        GridLayoutGroup myGroup;
@@ -45,7 +45,7 @@
        /// </summary>
        public void RefreshList()
        {
            Invoke("StartLater", slowTime);
            Invoke("StartLater", 0.1f);
            // if (Application.platform == RuntimePlatform.WindowsEditor)
            // {
@@ -54,26 +54,28 @@
            // }
            return;
            List<EndlessDrop> list = EndlessDropManager.instance.GetAllObtainedDrop();
            // List<EndlessDrop> list = EndlessDropManager.instance.GetAllObtainedDrop();
            for (int i = 0; i < list.Count; ++i)
            {
                if (list[i].Reward.type == CURRENCY.Gold)
                {
                    AddItem($"{(int)list[i].Reward.type}");
                }
                else
                {
                    for (int j = 0; j < list[i].Reward.count; ++j)
                    {
                        AddItem($"{(int)list[i].Reward.type}_{list[i].Reward.id}");
                    }
                }
            }
            // for (int i = 0; i < list.Count; ++i)
            // {
            //     if (list[i].Reward.type == CURRENCY.Gold)
            //     {
            //         AddItem($"{(int)list[i].Reward.type}");
            //     }
            //     else
            //     {
            //         for (int j = 0; j < list[i].Reward.count; ++j)
            //         {
            //             AddItem($"{(int)list[i].Reward.type}_{list[i].Reward.id}");
            //         }
            //     }
            // }
        }
        private void StartLater()
        {
            AudioSourceManager.Ins.Play(AudioEnum.End);
            StartCoroutine(ShowSlow());
        }