FiE-Game/Assets/Scripts/Fie/Object/FieAnimationContainerBase.cs

46 lines
1.4 KiB
C#
Raw Normal View History

2018-11-20 20:10:49 +01:00
using System.Collections.Generic;
2018-11-21 21:16:20 +01:00
namespace Fie.Object {
2018-11-20 20:10:49 +01:00
2018-11-21 21:16:20 +01:00
public abstract class FieAnimationContainerBase {
public enum BaseAnimTrack {
MOTION,
EMOTION,
MAX_BASE_TRACK
}
2018-11-20 20:10:49 +01:00
2018-11-21 21:16:20 +01:00
public enum BaseAnimList {
IDLE,
MAX_BASE_ANIMATION
}
2018-11-20 20:10:49 +01:00
2018-11-21 21:16:20 +01:00
private Dictionary<int, FieSkeletonAnimationObject> animationList = new Dictionary<int, FieSkeletonAnimationObject>();
2018-11-20 20:10:49 +01:00
2018-11-21 21:16:20 +01:00
/// <summary>
/// Gets the list of all animations registered to this container.
/// </summary>
public Dictionary<int, FieSkeletonAnimationObject> getAnimationList() {
return animationList;
}
2018-11-20 20:10:49 +01:00
2018-11-21 21:16:20 +01:00
/// <summary>
/// Gets the skeleton animation for the provided animation id.
/// Returns null of one such animation exists (????)
/// </summary>
public FieSkeletonAnimationObject getAnimation(int animationId) {
// TODO: Shouldn't this be inverted?
if (animationList.ContainsKey(animationId)) {
return null;
}
return animationList[animationId];
}
/// <summary>
/// Registers animation details for the given id to this container.
/// </summary>
public void addAnimationData(int animationID, FieSkeletonAnimationObject animationObject) {
animationList.Add(animationID, animationObject);
}
}
2018-11-20 20:10:49 +01:00
}