Ejemplo n.º 1
0
 //Texture: Voronoi field
 public void DisplayTexture_VoronoiField()
 {
     if (DisplayTexture(texture_VoronoiField))
     {
         visibleTexture = DisplayController.TextureTypes.Voronoi_Field;
     }
 }
Ejemplo n.º 2
0
 //Texture: Distance to target
 public void DisplayTexture_FlowField_DistanceToTarget()
 {
     if (DisplayTexture(texture_DistanceToTarget))
     {
         visibleTexture = DisplayController.TextureTypes.Flowfield_Target;
     }
 }
Ejemplo n.º 3
0
 //Texture: Distance to closest obstacle
 public void DisplayTexture_FlowField_DistanceToObstacle()
 {
     if (DisplayTexture(texture_DistanceToObstacle))
     {
         visibleTexture = DisplayController.TextureTypes.Flowfield_Obstacle;
     }
 }
Ejemplo n.º 4
0
 //Texture: Voronoi field
 public void DisplayTexture_VoronoiDiagram()
 {
     if (DisplayTexture(texture_VoronoiDiagram))
     {
         visibleTexture = DisplayController.TextureTypes.Voronoi_Diagram;
     }
 }
Ejemplo n.º 5
0
    void Start()
    {
        aboutMenuObj.SetActive(false);
        descriptionMenuObj.SetActive(false);

        StartCoroutine(UpdateSpeedText());

        ifFoundPathText.text = "";

        //Init the dropdowns
        //Search tree
        List <string> searchTreeOptionsStrings = new List <string>();

        int numOfEnums1 = Enum.GetNames(typeof(DisplayController.SearchTreeTypes)).Length;

        for (int i = 0; i < numOfEnums1; i++)
        {
            DisplayController.SearchTreeTypes word = (DisplayController.SearchTreeTypes)i;

            searchTreeOptionsStrings.Add(word.ToString());
        }

        dropdownSearchTree.AddOptions(searchTreeOptionsStrings);


        //Texture
        List <string> textureOptionsStrings = new List <string>();

        int numOfEnums2 = Enum.GetNames(typeof(DisplayController.TextureTypes)).Length;

        for (int i = 0; i < numOfEnums2; i++)
        {
            DisplayController.TextureTypes word = (DisplayController.TextureTypes)i;

            textureOptionsStrings.Add(word.ToString());
        }

        dropdownDisplayTexture.AddOptions(textureOptionsStrings);


        //Vehicles
        List <string> vehicleStrings = new List <string>();

        int numOfEnums3 = Enum.GetNames(typeof(SimController.VehicleTypes)).Length;

        for (int i = 0; i < numOfEnums3; i++)
        {
            SimController.VehicleTypes word = (SimController.VehicleTypes)i;

            vehicleStrings.Add(word.ToString());
        }

        dropdownChangeVehicle.AddOptions(vehicleStrings);
    }
Ejemplo n.º 6
0
    //When choosing this method from the inspector, pick the uppermost one below "Dynamic int" and not "Static parameters"
    public void DisplayTexture(int index)
    {
        if (DisplayController.current == null)
        {
            return;
        }

        //Which texture did we select in the dropdown
        DisplayController.TextureTypes type = (DisplayController.TextureTypes)index;

        DisplayController.current.DisplayTexture(type);
    }
Ejemplo n.º 7
0
    private void Start()
    {
        //Resize the quads to fit the grid
        int mapWidth = Parameters.mapWidth;

        Vector3 centerPos = new Vector3(mapWidth * 0.5f, DisplayController.flowFieldHeight, mapWidth * 0.5f);

        Vector3 scale = new Vector3(mapWidth, mapWidth, 1f);

        //Add the data to the quads
        quad.position = centerPos;

        quad.localScale = scale;

        //Deactivate it
        quad.gameObject.SetActive(false);

        visibleTexture = DisplayController.TextureTypes.None;
    }
Ejemplo n.º 8
0
    //Texture: None
    public void DisplayNoTexture()
    {
        DeActivateQuad();

        visibleTexture = DisplayController.TextureTypes.None;
    }