31 lines
1006 B
C#
31 lines
1006 B
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class YogaDataLoader
|
|
{
|
|
|
|
public static YogaDataData LoadData(int index)
|
|
{
|
|
//Resources.Load<TextAsset>("YogaActions/YogaAction" + ActionIndex);
|
|
|
|
Dictionary<int, YogaDataData> data = new Dictionary<int, YogaDataData>();
|
|
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;
|
|
} |