Files
taptap2024_GJ_chidouren/Packages/CC-Framework/com.foldcc.icecreamview/Runtime/Event/EventArg.cs
2024-10-16 00:03:41 +08:00

32 lines
780 B
C#

using System.Collections.Generic;
namespace IcecreamView
{
public class EventArg
{
private List<object> values;
public EventArg(params object[] values)
{
if (values == null)
{
this.values = null;
return;
}
this.values = new List<object>(values);
}
public T GetValue<T>(int index = 0)
{
if (this.values == null || index >= this.values.Count)
{
return default;
}
return (T)this.values[index];
}
public bool IsNotNull(int index = 0) { return this.values.Count > index && this.values[index] != null; }
public int Count => values.Count;
}
}