2019-02-01 17:19:20 +00:00
|
|
|
|
namespace RobloxFiles.DataTypes
|
2019-01-26 00:39:37 +00:00
|
|
|
|
{
|
2019-02-01 18:40:39 +00:00
|
|
|
|
public class NumberSequenceKeypoint
|
2019-01-26 00:39:37 +00:00
|
|
|
|
{
|
|
|
|
|
public readonly float Time;
|
|
|
|
|
public readonly float Value;
|
|
|
|
|
public readonly float Envelope;
|
|
|
|
|
|
2019-11-01 02:40:31 +00:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return $"{Time} {Value} {Envelope}";
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-26 00:39:37 +00:00
|
|
|
|
public NumberSequenceKeypoint(float time, float value, float envelope = 0)
|
|
|
|
|
{
|
|
|
|
|
Time = time;
|
|
|
|
|
Value = value;
|
|
|
|
|
Envelope = envelope;
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-13 01:16:19 +00:00
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
{
|
|
|
|
|
int hash = Time.GetHashCode()
|
|
|
|
|
^ Value.GetHashCode()
|
|
|
|
|
^ Envelope.GetHashCode();
|
|
|
|
|
|
|
|
|
|
return hash;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
{
|
2021-02-18 19:15:08 +00:00
|
|
|
|
if (!(obj is NumberSequenceKeypoint otherKey))
|
2020-09-13 01:16:19 +00:00
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
if (!Time.Equals(otherKey.Time))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
if (!Value.Equals(otherKey.Value))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
if (!Envelope.Equals(otherKey.Envelope))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2019-01-26 00:39:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|