PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/XSpriter/Animation.cs

https://bitbucket.org/dylanwolf/xspriter
C# | 27 lines | 24 code | 3 blank | 0 comment | 0 complexity | 9eefdda927527de0341868a06a2e4cc3 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace FuncWorks.XNA.XSpriter
  6. {
  7. public struct Animation
  8. {
  9. public String Name;
  10. public Int64 Length;
  11. public Boolean Looping;
  12. public Frame[] Frames;
  13. public Dictionary<String, Int32> TextureTimelines;
  14. public Dictionary<String, Int32> BoneTimelines;
  15. public int? GetTimelineIdByTextureName(string textureName)
  16. {
  17. return TextureTimelines.ContainsKey(textureName) ? (int?)TextureTimelines[textureName] : null;
  18. }
  19. public int? GetTimelineIdByBoneName(string boneName)
  20. {
  21. return BoneTimelines.ContainsKey(boneName) ? (int?)BoneTimelines[boneName] : null;
  22. }
  23. }
  24. }