Ejemplo n.º 1
0
        //properly destroy current pedestrian
        public void DestroyPedestrian(PedestrianSystemManager pedestrianSystem)
        {
            if (!isDestroyed)
            {
                isDestroyed = true;

                pedestrianSystem.curPedestiansSpawned--;
                Destroy(this.gameObject);
            }
        }
Ejemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            PedestrianSystemManager myScript = (PedestrianSystemManager)target;

            if (GUILayout.Button("Get Waypoints"))
            {
                myScript.GetWaypoints();
            }

            if (GUILayout.Button("Add Waypoint"))
            {
                myScript.AddWaypoint();
            }

            if (GUILayout.Button("Remove Waypoint"))
            {
                myScript.RemoveLastWaypoint();
            }
        }