using System.Collections.Generic; using UnityEngine; public class YogaDataLoader { public static YogaDataData LoadData(int index) { //Resources.Load("YogaActions/YogaAction" + ActionIndex); Dictionary data = new Dictionary(); data[1] = new YogaDataData() { VideoPath = "Video/Action1", Action = AvatarAction.HeadShake , MaxActionCount = 4}; data[2] = new YogaDataData() { VideoPath = "Video/Action2", Action = AvatarAction.Nod , MaxActionCount = 4 }; data[3] = new YogaDataData() { VideoPath = "Video/Action3", Action = AvatarAction.HandsUp , MaxActionCount = 4 }; if (data.ContainsKey(index)) return data[index]; else { Debug.LogError("YogaDataLoader.LoadData: index out of range"); } return null; } } public class YogaDataData { public string VideoPath; public AvatarAction Action; public int MaxActionCount; }