Some improvements

This commit is contained in:
Perfare
2018-04-09 02:43:58 +08:00
parent 7410511c40
commit 9e4be3e082
5 changed files with 77 additions and 104 deletions

View File

@ -91,8 +91,9 @@ namespace AssetStudio
}
}
public interface ImportedAnimation
public abstract class ImportedAnimation
{
public string Name { get; set; }
}
public abstract class ImportedAnimationTrackContainer<TrackType> : ImportedAnimation where TrackType : ImportedAnimationTrack
@ -107,12 +108,11 @@ namespace AssetStudio
public class ImportedKeyframedAnimation : ImportedAnimationTrackContainer<ImportedAnimationKeyframedTrack>
{
public string Name { get; set; }
}
public class ImportedSampledAnimation : ImportedAnimationTrackContainer<ImportedAnimationSampledTrack>
{
public string Name { get; set; }
public float SampleRate { get; set; }
}
@ -121,11 +121,6 @@ namespace AssetStudio
public string Name { get; set; }
}
public class ImportedAnimationKeyframedTrack : ImportedAnimationTrack
{
public Dictionary<float, ImportedAnimationKeyframe> Keyframes { get; set; } = new Dictionary<float, ImportedAnimationKeyframe>();
}
public class ImportedKeyframe<T>
{
public float time { get; set; }
@ -142,11 +137,11 @@ namespace AssetStudio
}
}
public class ImportedAnimationKeyframe
public class ImportedAnimationKeyframedTrack : ImportedAnimationTrack
{
public ImportedKeyframe<Vector3> Scaling { get; set; }
public ImportedKeyframe<Quaternion> Rotation { get; set; }
public ImportedKeyframe<Vector3> Translation { get; set; }
public List<ImportedKeyframe<Vector3>> Scalings = new List<ImportedKeyframe<Vector3>>();
public List<ImportedKeyframe<Quaternion>> Rotations = new List<ImportedKeyframe<Quaternion>>();
public List<ImportedKeyframe<Vector3>> Translations = new List<ImportedKeyframe<Vector3>>();
}
public class ImportedAnimationSampledTrack : ImportedAnimationTrack