コード例 #1
0
ファイル: MyMMLBox.cs プロジェクト: luoyang9/airband-client
            public override void OnInspectorGUI()
            {
#if false
                if (null == FindObjectOfType <MySyntheStation>())
                {
                    EditorGUILayout.HelpBox("MyMMLBox requires MySyntheStation", MessageType.Warning);
                }
#endif
                {
                    var curSyntheStation = FindObjectOfType <MySyntheStation>();
                    if (curSyntheStation != syntheStation)
                    {
                        syntheStation = curSyntheStation;
                        if (sequencer != null)
                        {
                            sequencer.Stop(0.0f);
                            syntheStation.RemoveSequencer(sequencer);
                            sequencer = null;
                        }
                    }
                }
                serializedObject.Update();
                EditorGUILayout.PropertyField(serializedObject.FindProperty("player"));
                EditorGUILayout.PropertyField(serializedObject.FindProperty("audioSource"));
                editorGUILayout_Clips(serializedObject.FindProperty("clips"));
                serializedObject.ApplyModifiedProperties();
            }
コード例 #2
0
 private void OnDisable()
 {
     if (sequencer != null)
     {
         sequencer.Stop(0.0f);
         syntheStation.RemoveSequencer(sequencer);
         sequencer = null;
     }
     syntheStation = null;
 }
コード例 #3
0
 public ClipPreparingJob(MySyntheStation Station, MyMMLClip Clip, AssetBundle Bundle, bool DontGenerate)
 {
     station      = Station;
     clip         = Clip;
     bundle       = Bundle;
     mmlText      = clip.Text;
     clip.Dirty   = false;
     clip.Unit    = null;
     dontGenerate = DontGenerate;
 }
コード例 #4
0
 private void OnDisable()
 {
     if (syntheStation == null)
     {
         return;
     }
     foreach (var clip in clips)
     {
         clip.Flush();
     }
     syntheStation = null;
 }
コード例 #5
0
 private void OnEnable()
 {
     syntheStation = FindObjectOfType <MySyntheStation>();
     if (syntheStation == null)
     {
         return;
     }
     foreach (var clip in clips)
     {
         syntheStation.PrepareClip(clip);
     }
 }
コード例 #6
0
 private void OnEnable()
 {
     syntheStation = GameObject.FindObjectOfType <MySyntheStation>();
     if (syntheStation == null)
     {
         return;
     }
     sequencer = new MyMMLSequencer(syntheStation.TickFrequency);
     syntheStation.AddSequencer(sequencer);
     sequencer.AppDataEvent     += appDataEvent;
     sequencer.PlayingEvent     += playingEvent;
     sequencer.NextSectionEvent += nextSectionEvent;
     state = PlayState.Stopped;
     //Debug.Log("start:" + Application.isPlaying);
 }
コード例 #7
0
 private void OnDisable()
 {
     //Debug.Log("OnDisable:" + Application.isPlaying);
     if (sequencer == null)
     {
         return;
     }
     if (sequencer.Playing)
     {
         sequencer.Stop(0.0f);
     }
     if (syntheStation != null)
     {
         syntheStation.RemoveSequencer(sequencer);
     }
     sequencer.AppDataEvent     -= appDataEvent;
     sequencer.PlayingEvent     -= playingEvent;
     sequencer.NextSectionEvent -= nextSectionEvent;
     clip          = null;
     sequencer     = null;
     state         = PlayState.Stopped;
     syntheStation = null;
 }
コード例 #8
0
 private void OnEnable()
 {
     syntheStation = FindObjectOfType <MySyntheStation>();
     sequencer     = null;
 }
コード例 #9
0
 void Start()
 {
     syntheStation = GameObject.FindObjectOfType <MySyntheStation>();
     OnEnable();
 }
コード例 #10
0
ファイル: MyMMLBox.cs プロジェクト: luoyang9/airband-client
 void OnEnale()
 {
     syntheStation = FindObjectOfType <MySyntheStation>();
 }