VRTouchKagManager.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. public class VRTouchKagManager : BaseKagManager
  3. {
  4. public VRTouchKagManager(SceneVRTouch scene, TJSScript tjs, ScriptManager script_mgr) : base(tjs, script_mgr)
  5. {
  6. this.scene_vr_touch_ = scene;
  7. }
  8. public override void Initialize()
  9. {
  10. base.Initialize();
  11. this.kag_.AddTagCallBack("shuffle", new KagScript.KagTagCallBack(this.TagShuffle));
  12. }
  13. public bool TagShuffle(KagTagSupport tag_data)
  14. {
  15. NDebug.Assert(this.scene_vr_touch_ != null, "SceneVRTouch インスタンスが見つかりません。");
  16. int f_nKouhun = 0;
  17. if (tag_data.IsValid("kouhun"))
  18. {
  19. f_nKouhun = tag_data.GetTagProperty("kouhun").AsInteger();
  20. }
  21. string f_strVoiceFileName = string.Empty;
  22. if (tag_data.IsValid("voice"))
  23. {
  24. f_strVoiceFileName = tag_data.GetTagProperty("voice").AsString();
  25. }
  26. string f_strFace = string.Empty;
  27. if (tag_data.IsValid("face"))
  28. {
  29. f_strFace = tag_data.GetTagProperty("face").AsString();
  30. }
  31. string f_strFaceBlend = string.Empty;
  32. if (tag_data.IsValid("faceblend"))
  33. {
  34. f_strFaceBlend = tag_data.GetTagProperty("faceblend").AsString();
  35. }
  36. this.voice_script_add_dg_(f_nKouhun, f_strVoiceFileName, f_strFace, f_strFaceBlend);
  37. return false;
  38. }
  39. public override string GetKagClassName()
  40. {
  41. return "VRタッチkag";
  42. }
  43. public void SetShuffleDg(VRTouchKagManager.dgOnVoiceScriptAdd f_dg)
  44. {
  45. this.voice_script_add_dg_ = f_dg;
  46. }
  47. private SceneVRTouch scene_vr_touch_;
  48. private VRTouchKagManager.dgOnVoiceScriptAdd voice_script_add_dg_;
  49. public delegate void dgOnVoiceScriptAdd(int f_nKouhun, string f_strVoiceFileName, string f_strFace, string f_strFaceBlend);
  50. }