Add methods to Animation and AnimationSet for easier manipulation and

display of groups of animations (Equal(), ToString(), FromOSDArray(), ...).
No functional change to animations.
This commit is contained in:
Robert Adams
2013-05-30 14:30:45 -07:00
parent 439f11cc3c
commit 48a175eff7
3 changed files with 156 additions and 0 deletions

View File

@@ -120,5 +120,25 @@ namespace OpenSim.Framework
sequenceNum = args["seq_num"].AsInteger();
}
public override bool Equals(object obj)
{
Animation other = obj as Animation;
if (other != null)
{
return (other.AnimID == this.AnimID
&& other.SequenceNum == this.SequenceNum
&& other.ObjectID == this.ObjectID);
}
return base.Equals(obj);
}
public override string ToString()
{
return "AnimID=" + AnimID.ToString()
+ "/seq=" + SequenceNum.ToString()
+ "/objID=" + ObjectID.ToString();
}
}
}