Example #1
0
 public void OnGUI()
 {
     GUILayout.BeginVertical(GUILayout.Width(300));
     GUILayout.BeginHorizontal();
     if (GUILayout.Button("<-"))
     {
         prevSelectionType = selectionType;
         selectionType     = (BehaviorSelectionType)(((int)selectionType - 1) % (int)BehaviorSelectionType.Last);
         if ((int)selectionType < 0)
         {
             selectionType = BehaviorSelectionType.Queue;
         }
         SelectionChanged();
     }
     GUILayout.Box(SplitCamelCase(selectionType.ToString()), GUILayout.Width(220));
     if (GUILayout.Button("->"))
     {
         prevSelectionType = selectionType;
         selectionType     = (BehaviorSelectionType)(((int)selectionType + 1) % (int)BehaviorSelectionType.Last);
         SelectionChanged();
     }
     GUILayout.EndHorizontal();
     GUILayout.Box(Description(), descriptionGUISkin.box);
     GUILayout.EndVertical();
 }
Example #2
0
 public void OnGUI()
 {
     GUILayout.BeginVertical(GUILayout.Width(300));
     GUILayout.BeginHorizontal();
     if (GUILayout.Button("<-"))
     {
         prevSelectionType = selectionType;
         selectionType     = (BehaviorSelectionType)(((int)selectionType - 1) % (int)BehaviorSelectionType.Last);
         if ((int)selectionType < 0)
         {
             selectionType = BehaviorSelectionType.Queue;
         }
         SelectionChanged();
     }
     GUILayout.Box(SplitCamelCase(selectionType.ToString()), GUILayout.Width(220));
     if (GUILayout.Button("->"))
     {
         prevSelectionType = selectionType;
         selectionType     = (BehaviorSelectionType)(((int)selectionType + 1) % (int)BehaviorSelectionType.Last);
         SelectionChanged();
     }
     GUILayout.EndHorizontal();
     GUILayout.Box(Description(), descriptionGUISkin.box);
     if (selectionType == BehaviorSelectionType.CanHearObject)
     {
         if (GUILayout.Button("Play Sound"))
         {
             marker.GetComponent <AudioSource>().Play();
         }
     }
     GUILayout.EndVertical();
 }