using System.Collections.Generic;

namespace BingoBrain
{
    public class TipsData
    {
        public string ValueStr;

        public float ShowTipsAniTime = 0.2f;

        public float TipsStayAniTime = 1f;

        public float TipsVanishTime = 1.5f;

        public int TipsVanishMoveDic = 100;

        private static List<TipsData> tempTipsData;

        public static TipsData GetTips(string val)
        {
            return GetTips(val, 0.2f, 1, 1.5f, 100);
        }

        public static TipsData GetTips(string val, float ShowTipsAniTime, float TipsStayAniTime, float TipsVanishTime,
            int TipsVanishMoveDic)
        {
            if (tempTipsData == default)
            {
                tempTipsData = new List<TipsData>();
                tempTipsData.Add(new TipsData());
                tempTipsData.Add(new TipsData());
            }

            if (tempTipsData.Count <= 0) return default;
            TipsData tips = tempTipsData[0];
            tempTipsData.RemoveAt(0);
            tips.ValueStr = val;
            tips.ShowTipsAniTime = ShowTipsAniTime;
            tips.TipsStayAniTime = TipsStayAniTime;
            tips.TipsVanishTime = TipsVanishTime;
            tips.TipsVanishMoveDic = TipsVanishMoveDic;
            return tips;
        }

        public void Rest()
        {
            tempTipsData.Add(this);
        }
    }
}