mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
3.0 - unitypackage
This commit is contained in:
26
Runtime/Serie/Scatter/EffectScatterHandler.cs
Normal file
26
Runtime/Serie/Scatter/EffectScatterHandler.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[UnityEngine.Scripting.Preserve]
|
||||
internal sealed class EffectScatterHandler : BaseScatterHandler<EffectScatter>
|
||||
{
|
||||
private float m_EffectScatterSpeed = 15;
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
base.Update();
|
||||
var symbolSize = serie.symbol.GetSize(null, chart.theme.serie.scatterSymbolSize);
|
||||
for (int i = 0; i < serie.symbol.animationSize.Count; ++i)
|
||||
{
|
||||
serie.symbol.animationSize[i] += m_EffectScatterSpeed * Time.deltaTime;
|
||||
if (serie.symbol.animationSize[i] > symbolSize)
|
||||
{
|
||||
serie.symbol.animationSize[i] = i * 5;
|
||||
}
|
||||
chart.RefreshPainter(serie);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user