Exemplo n.º 1
0
    public static void Init()
    {
        // Get existing open window or if none, make a new one:
        window         = (ObstacleManagerWindow)EditorWindow.GetWindow(typeof(ObstacleManagerWindow));
        window.minSize = new Vector2(375, 449);
        window.maxSize = new Vector2(375, 800);

        prefab       = LoadObstacle();
        obstacleList = prefab.obstacleList;

        foreach (Obstacle obs in obstacleList)
        {
            obstacleIDList.Add(obs.prefabID);
        }

        intVal = new int[3];
        for (int i = 0; i < intVal.Length; i++)
        {
            intVal[i] = i;
        }

        coverTypeLabel    = new string[3];
        coverTypeLabel[0] = "None";
        coverTypeLabel[1] = "Half";
        coverTypeLabel[2] = "Full";

        tileTypeLabel    = new string[3];
        tileTypeLabel[0] = "Hex";
        tileTypeLabel[1] = "Square";
        tileTypeLabel[2] = "Universal";

        obstacleTypeLabel    = new string[2];
        obstacleTypeLabel[0] = "Obstacle";
        obstacleTypeLabel[1] = "Wall";
    }
Exemplo n.º 2
0
    public static void Init()
    {
        // Get existing open window or if none, make a new one:
        window = (ObstacleManagerWindow)EditorWindow.GetWindow(typeof (ObstacleManagerWindow));
        window.minSize=new Vector2(375, 449);
        window.maxSize=new Vector2(375, 800);

        prefab=LoadObstacle();
        obstacleList=prefab.obstacleList;

        foreach(Obstacle obs in obstacleList){
            obstacleIDList.Add(obs.prefabID);
        }

        intVal=new int[3];
        for(int i=0; i<intVal.Length; i++) intVal[i]=i;

        coverTypeLabel=new string[3];
        coverTypeLabel[0]="None";
        coverTypeLabel[1]="Half";
        coverTypeLabel[2]="Full";

        tileTypeLabel=new string[3];
        tileTypeLabel[0]="Hex";
        tileTypeLabel[1]="Square";
        tileTypeLabel[2]="Universal";

        obstacleTypeLabel=new string[2];
        obstacleTypeLabel[0]="Obstacle";
        obstacleTypeLabel[1]="Wall";
    }
Exemplo n.º 3
0
    void LoadObstacle()
    {
        ObstacleListPrefab prefab = ObstacleManagerWindow.LoadObstacle();

        obstacleList     = new List <Obstacle>();
        obstacleNameList = new string[prefab.obstacleList.Count + 2];

        obstacleList.Add(null);
        obstacleList.Add(null);
        obstacleNameList[0] = "empty(invisible)";
        obstacleNameList[1] = "empty(visible)";

        for (int i = 0; i < prefab.obstacleList.Count; i++)
        {
            obstacleList.Add(prefab.obstacleList[i]);
            obstacleNameList[i + 2] = prefab.obstacleList[i].obsName;
        }
    }
Exemplo n.º 4
0
 static void OpenObstacleManagerWindow()
 {
     ObstacleManagerWindow.Init();
 }