fix:1、添加项目
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
namespace FlowerPower
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class JoastData
|
||||
{
|
||||
public string ValueStr;
|
||||
|
||||
public float ShowTipsAniTime = 0.2f;
|
||||
|
||||
public float TipsStayAniTime = 1f;
|
||||
|
||||
public float TipsVanishTime = 1.5f;
|
||||
|
||||
public int TipsVanishMoveDic = 100;
|
||||
|
||||
private static List<JoastData> tempTipsData;
|
||||
|
||||
public static JoastData GetTips(string val)
|
||||
{
|
||||
return GetTips(val, 0.2f, 1, 1.5f, 100);
|
||||
}
|
||||
|
||||
public static JoastData GetTips(string val, float ShowTipsAniTime, float TipsStayAniTime, float TipsVanishTime,
|
||||
int TipsVanishMoveDic)
|
||||
{
|
||||
if (tempTipsData == default)
|
||||
{
|
||||
tempTipsData = new List<JoastData>
|
||||
{
|
||||
new(),
|
||||
new()
|
||||
};
|
||||
}
|
||||
|
||||
if (tempTipsData.Count <= 0) return default;
|
||||
var 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user