Ejemplo n.º 1
0
    void Awake()
    {
        LoadCSV.Load();

        float startx   = LoadCSV.rowList[0].longitudem;
        float startz   = LoadCSV.rowList[0].latitudem;
        int   lastline = LoadCSV.rowList.Count - 1;
        float endy     = LoadCSV.rowList[lastline].height1;


        Vector3 scale = Vector3.one * 10f;
        Vector3 position;

        foreach (Row r in LoadCSV.rowList)
        {
            Transform point = Instantiate(pointprefab);
            position.x          = r.longitudem - startx;
            position.z          = r.latitudem - startz;
            position.y          = r.height1 - endy;
            point.localPosition = position;
            point.localScale    = scale;

            //Debug.Log(r.longitudem - startx);
        }
    }
Ejemplo n.º 2
0
 public void WriteCSV(string txt)
 {
     if (LoadCSV.getI() > 0)
     {
         StreamWriter streamWriter;
         FileInfo     fileInfo;
         fileInfo     = new FileInfo(Application.dataPath + "/" + filepathname + "/" + name + ".csv");
         streamWriter = fileInfo.AppendText();
         streamWriter.WriteLine(txt);
         com[num] = txt;
         num++;
         streamWriter.Flush();
         streamWriter.Close();
     }
     else
     {
         StreamWriter streamWriter;
         FileInfo     fileInfo;
         fileInfo     = new FileInfo(Application.dataPath + "/" + filepathname + "/" + name + ".csv");
         streamWriter = fileInfo.AppendText();
         streamWriter.WriteLine(txt);
         com[num] = txt;
         num++;
         streamWriter.Flush();
         streamWriter.Close();
     }
 }
Ejemplo n.º 3
0
        private void LoadCsvIntoBD(object sender, RoutedEventArgs e)
        {
            //check if it is empty
            FC_Carrier c = new FC_Carrier();

            if (c.ObjToTable(SQL.Select(c)).Count == 0)
            {
                LoadCSV.Load();
            }

            Carrier_DataLoadClick(null, null);
        }
Ejemplo n.º 4
0
        private void ChangeCSVLocation(object sender, RoutedEventArgs e)
        {
            // View Save As File Dialog
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter = "csv Files (*.csv)|*.csv";

            if (openFileDialog.ShowDialog() == true)
            {
                LoadCSV.SetNewCSVLocation(openFileDialog.FileName);
                LoadCSV.Load();
            }
        }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        loadcsv = LoadCSV_Obj.GetComponent <LoadCSV>();

        roupNmber = loadcsv.BinaryLoad();

        // Trajectoryがなければ生成
        if (GameObject.Find("Trajectory") != null)
        {
            //軌跡のオブジェクトを格納する親オブジェクト
            GhostParent = GameObject.Find("Trajectory").transform;
        }
        else
        {
            //軌跡のオブジェクトを格納する親オブジェクト
            GameObject Trajectory = new GameObject();
            Trajectory.name = "Trajectory";
            GhostParent     = Trajectory.transform;
        }
    }
Ejemplo n.º 6
0
    // Use this for initialization
    void Start()
    {
        comm    = new string[1024];
        number  = new int[1024];
        comlist = new List <string>();
        list    = new List <GameObject>();
        LoadCSV.csvload();
        Text  = GameObject.Find("Text").GetComponent <Text>();
        retry = GameObject.Find("Canvas/retry");
        retry.SetActive(false);
        next = GameObject.Find("Canvas/next");
        //Debug.Log(next);
        stagename = SceneManager.GetActiveScene().name;
        if (stagename == "stage1Result" || stagename == "stage2Result")
        {
            next.SetActive(!next.activeSelf);
        }
        end = GameObject.Find("end");

        if (stagename == "stage3Result")
        {
            end.SetActive(false);
        }
    }
Ejemplo n.º 7
0
 static void Load()
 {
     LoadCSV.LoadAndUpdate <ClassValues>(linkDB, pathAssets, UpdateAsset);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Will connect to Photon server and load the deck the player chose
 /// </summary>
 private void loadDeckFromServer()
 {
     // Grab Deck from the server - Currently only grabs from local CSV
     _playerDeck = LoadCSV.Load(Resources.Load <TextAsset>("Data/testdeck"));
 }
Ejemplo n.º 9
0
 // Use this for initialization
 void Start()
 {
     com = new string[1024];
     LoadCSV.csvload();
 }