void OnGUI()
        {
            GUILayout.Label("Current Item: " + (sequenceItem == null ? "None" : sequenceItem.ToString()));

            GUILayout.Space(16);

            scroll = GUILayout.BeginScrollView(scroll, GUILayout.Width(Screen.width - 50));

            GUILayout.Label("Plays the sequence named 'Urlu'. You can watch it's progress in the PureData script under Sequences.");
            if (GUILayout.Button("Play"))
            {
                sequenceItem = PureData.PlaySequence("Urlu");
            }

            GUILayout.Space(8);

            if (sequenceItem != null)
            {
                GUILayout.Label("Stops the sequence if it is still playing.");
                if (GUILayout.Button("Stop"))
                {
                    sequenceItem.Stop();
                    sequenceItem = null;
                }
            }

            GUILayout.EndScrollView();
        }
Exemple #2
0
        public PureDataSequenceItem PlaySequence(string sequenceName, object source, float delay, params PureDataOption[] options)
        {
            PureDataSequenceItem item = GetSequenceItem(sequenceName, source);

            item.ApplyOptions(options);
            item.Play(delay);
            return(item);
        }
		void OnGUI() {
			GUILayout.Label("Current Item: " + (sequenceItem == null ? "None" : sequenceItem.ToString()));
		
			GUILayout.Space(16);
		
			scroll = GUILayout.BeginScrollView(scroll, GUILayout.Width(Screen.width - 50));
		
			GUILayout.Label("Plays the sequence named 'Urlu'. You can watch it's progress in the PureData script under Sequences.");
			if (GUILayout.Button("Play")) {
				sequenceItem = PureData.PlaySequence("Urlu");
			}
				
			GUILayout.Space(8);
		
			if (sequenceItem != null) {
				GUILayout.Label("Stops the sequence if it is still playing.");
				if (GUILayout.Button("Stop")) {
					sequenceItem.Stop();
					sequenceItem = null;
				}
			}
		
			GUILayout.EndScrollView();
		}
Exemple #4
0
 void PlaySequence()
 {
     sequence = PureData.PlaySequence("Music");
 }
 void Start()
 {
     sequenceItem1 = PureData.PlaySequence("1");
     sequenceItem2 = PureData.PlaySequence("2");
     sequenceItem3 = PureData.PlaySequence("3");
 }