예제 #1
0
        public void OnGUI()
        {
            if (GUILayout.Button("2"))
            {
                CreateAgents(2);
            }
            if (GUILayout.Button("10"))
            {
                CreateAgents(10);
            }
            if (GUILayout.Button("100"))
            {
                CreateAgents(100);
            }
            if (GUILayout.Button("500"))
            {
                CreateAgents(500);
            }
            if (GUILayout.Button("1000"))
            {
                CreateAgents(1000);
            }
            if (GUILayout.Button("5000"))
            {
                CreateAgents(5000);
            }

            GUILayout.Space(5);

            if (GUILayout.Button("Random Streams"))
            {
                type = RVOExampleType.RandomStreams;
                CreateAgents(agents != null ? agents.Count : 100);
            }

            if (GUILayout.Button("Line"))
            {
                type = RVOExampleType.Line;
                CreateAgents(agents != null ? Mathf.Min(agents.Count, 100) : 10);
            }

            if (GUILayout.Button("Circle"))
            {
                type = RVOExampleType.Circle;
                CreateAgents(agents != null ? agents.Count : 100);
            }

            if (GUILayout.Button("Point"))
            {
                type = RVOExampleType.Point;
                CreateAgents(agents != null ? agents.Count : 100);
            }

            if (GUILayout.Button("Crossing"))
            {
                type = RVOExampleType.Crossing;
                CreateAgents(agents != null ? agents.Count : 100);
            }
        }
예제 #2
0
 public void OnGUI()
 {
     if (GUILayout.Button("2", new GUILayoutOption[0]))
     {
         this.CreateAgents(2);
     }
     if (GUILayout.Button("10", new GUILayoutOption[0]))
     {
         this.CreateAgents(10);
     }
     if (GUILayout.Button("100", new GUILayoutOption[0]))
     {
         this.CreateAgents(100);
     }
     if (GUILayout.Button("500", new GUILayoutOption[0]))
     {
         this.CreateAgents(500);
     }
     if (GUILayout.Button("1000", new GUILayoutOption[0]))
     {
         this.CreateAgents(0x3e8);
     }
     if (GUILayout.Button("5000", new GUILayoutOption[0]))
     {
         this.CreateAgents(0x1388);
     }
     GUILayout.Space(5f);
     if (GUILayout.Button("Random Streams", new GUILayoutOption[0]))
     {
         this.type = RVOExampleType.RandomStreams;
         this.CreateAgents((this.agents == null) ? 100 : this.agents.Count);
     }
     if (GUILayout.Button("Line", new GUILayoutOption[0]))
     {
         this.type = RVOExampleType.Line;
         this.CreateAgents((this.agents == null) ? 10 : Mathf.Min(this.agents.Count, 100));
     }
     if (GUILayout.Button("Circle", new GUILayoutOption[0]))
     {
         this.type = RVOExampleType.Circle;
         this.CreateAgents((this.agents == null) ? 100 : this.agents.Count);
     }
     if (GUILayout.Button("Point", new GUILayoutOption[0]))
     {
         this.type = RVOExampleType.Point;
         this.CreateAgents((this.agents == null) ? 100 : this.agents.Count);
     }
 }
예제 #3
0
	public void OnGUI () {
		if (GUILayout.Button ("2")) CreateAgents (2);
		if (GUILayout.Button ("10")) CreateAgents (10);
		if (GUILayout.Button ("100")) CreateAgents (100);
		if (GUILayout.Button ("500")) CreateAgents (500);
		if (GUILayout.Button ("1000")) CreateAgents (1000);
		if (GUILayout.Button ("5000")) CreateAgents (5000);

		GUILayout.Space (5);

		if (GUILayout.Button ("Random Streams")) {
			type = RVOExampleType.RandomStreams;
			CreateAgents ( agents != null ? agents.Count : 100 );
		}

		if (GUILayout.Button ("Line")) {
			type = RVOExampleType.Line;
			CreateAgents ( agents != null ? Mathf.Min (agents.Count, 100) : 10 );
		}

		if (GUILayout.Button ("Circle")) {
			type = RVOExampleType.Circle;
			CreateAgents ( agents != null ? agents.Count : 100 );
		}

		if (GUILayout.Button ("Point")) {
			type = RVOExampleType.Point;
			CreateAgents ( agents != null ? agents.Count : 100 );
		}
	}