void Start() { morphs_ = new MMD4MecanimMorphHelper[morphNames.Length]; for (int i = 0; i < morphNames.Length; ++i) { morphs_[i] = gameObject.AddComponent <MMD4MecanimMorphHelper>(); morphs_[i].morphSpeed = morphSpeed; morphs_[i].morphName = morphNames[i]; } // Time.fixedDeltaTime = 0.01f; // Create OpenJTalkHandler object var ojt = new GameObject(); ojt.name = "OpenJTalk Handler"; OpenJTalk = ojt.AddComponent <OpenJTalkHandler>(); // Add MicHandler component mic_ = gameObject.AddComponent <MicHandler>(); mic_.Initialize(sampleNum); }
void Awake() { // Add audio source if (playingPosition) { audio_ = playingPosition.AddComponent <AudioSource>(); } else { audio_ = gameObject.AddComponent <AudioSource>(); } // Add OpneJTalk handler openjtalk_ = openjtalk; // Add MicHandler handler if (!mic.isReady) { mic.Initialize(sampleNum, micIndex); } // Initialize in subclass Initialize(); }
void Start() { morphs_ = new MMD4MecanimMorphHelper[morphNames.Length]; for (int i = 0; i < morphNames.Length; ++i) { morphs_[i] = gameObject.AddComponent<MMD4MecanimMorphHelper>(); morphs_[i].morphSpeed = morphSpeed; morphs_[i].morphName = morphNames[i]; } // Time.fixedDeltaTime = 0.01f; // Create OpenJTalkHandler object var ojt = new GameObject(); ojt.name = "OpenJTalk Handler"; OpenJTalk = ojt.AddComponent<OpenJTalkHandler>(); // Add MicHandler component mic_ = gameObject.AddComponent<MicHandler>(); mic_.Initialize(sampleNum); }
void Awake() { // Add audio source if (playingPosition) { audio_ = playingPosition.AddComponent<AudioSource>(); } else { audio_ = gameObject.AddComponent<AudioSource>(); } // Add OpneJTalk handler openjtalk_ = openjtalk; // Add MicHandler handler if (!mic.isReady) { mic.Initialize(sampleNum, micIndex); } // Initialize in subclass Initialize(); }