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();
 }
 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();
 }
Example #3
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();
 }
 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 #5
0
 void OnGUI()
 {
     GUILayout.BeginVertical(GUILayout.Width(300));
     GUILayout.BeginHorizontal();
     if (GUILayout.Button("<-"))
     {
         prevSelectionType = selectionType;
         selectionType = (BehaviorSelectionType)(((int)selectionType - 1) % 1);
         if ((int)selectionType < 0) selectionType = BehaviorSelectionType.Birth;
         SelectionChanged();
     }
     GUILayout.Box(SplitCamelCase(selectionType.ToString()), GUILayout.Width(220));
     if (GUILayout.Button("->"))
     {
         prevSelectionType = selectionType;
         selectionType = (BehaviorSelectionType)(((int)selectionType + 1) % 1);
         SelectionChanged();
     }
     GUILayout.EndHorizontal();
 }