Protogame.ModelSerializerVersion1.SerializeAnimations C# (CSharp) Méthode

SerializeAnimations() private méthode

Serializes a collection of animations to a binary stream.
private SerializeAnimations ( BinaryWriter writer, IAnimationCollection availableAnimations ) : void
writer System.IO.BinaryWriter /// The binary writer to which the animations will be serialized. ///
availableAnimations IAnimationCollection /// The animations to serialize. ///
Résultat void
        private void SerializeAnimations(BinaryWriter writer, IAnimationCollection availableAnimations)
        {
            writer.Write(availableAnimations.Count());

            foreach (var animation in availableAnimations)
            {
                writer.Write(animation.Name);
                writer.Write(animation.TicksPerSecond);
                writer.Write(animation.DurationInTicks);
                this.SerializeStringFloatVector3DictionaryDictionary(writer, animation.TranslationKeys);
                this.SerializeStringFloatQuaternionDictionaryDictionary(writer, animation.RotationKeys);
                this.SerializeStringFloatVector3DictionaryDictionary(writer, animation.ScaleKeys);
            }
        }