// Start is called before the first frame update
    void Start()
    {
        StartCoroutine(Utils.SetVRDevice("OpenVR", true));


        MC1 = M1.GetComponent <MasterController>();
        MC2 = M2.GetComponent <MasterController>();
        MC3 = M3.GetComponent <MasterController>();
        MC4 = M4.GetComponent <MasterController>();
        MC5 = M5.GetComponent <MasterController>();
        MC6 = M6.GetComponent <MasterController>();
        MC7 = M7.GetComponent <MasterController>();
        MC8 = M8.GetComponent <MasterController>();

        loadLevel();
        currentPoseIndex = 0;
    }
示例#2
0
        // Reads the input files
        // Fills the TABLES with DATA from the files
        private void Fill_tables(MySqlConnection connection)
        {
            // Add data to RoomTable
            Console.WriteLine("We now add records to RoomTable\n");
            using (StreamReader SR = new StreamReader("Room.txt"))
            {
                String S = SR.ReadLine();

                // Loop through the file reading lines
                while (S != null)
                {
                    String[] SArray    = S.Split(','); // Room.txt contains tab-delimited fields.
                    int      M         = Convert.ToInt32(SArray[1]);
                    int      Rm        = Convert.ToInt32(SArray[0]);
                    String   SqlString = "Insert Into RoomTable (Room, Capacity, Smart) Values(" +
                                         "'" + Rm.ToString() + "', " + M.ToString() + ", '" + SArray[2] + "')";
                    //Console.WriteLine(SqlString);

                    // Run the command
                    MySqlCommand Command2 = new MySqlCommand(SqlString, connection);
                    Command2.ExecuteNonQuery();
                    S = SR.ReadLine();
                } // end of while
            }     // end of using for StreamReader

            // Add data to OfficeTable
            Console.WriteLine("We now add records to OfficeTable\n");
            using (StreamReader SR = new StreamReader("Office.txt"))
            {
                String S = SR.ReadLine();
                // Loop through the file reading lines
                while (S != null)
                {
                    String[] SArray    = S.Split(','); // Room.txt contains tab-delimited fields.
                    int      M         = Convert.ToInt32(SArray[1]);
                    String   SqlString = "Insert Into OfficeTable (Teacher , Office) Values(" +
                                         "'" + SArray[0] + "', " + M.ToString() + ")";
                    //Console.WriteLine(SqlString);

                    // Run the command
                    MySqlCommand Command2 = new MySqlCommand(SqlString, connection);
                    Command2.ExecuteNonQuery();
                    S = SR.ReadLine();
                } // end of while
            }     // end of using for StreamReader

            // Add data to ClassTable
            Console.WriteLine("We now add records to ClassTable\n");
            using (StreamReader SR = new StreamReader("Class.txt"))
            {
                // Ints to Convert strings to ints
                int M0;
                int M1;
                int M3;
                int M6;

                String S = SR.ReadLine();
                while (S != null)
                {
                    // Show the string in the console
                    //Console.WriteLine(S);


                    // THIS WAS FOR THE ORIGINAL INPUT FILE FOR CLASSES
                    // If the line does not have Section 1 - ADD IT
                    //if ( (S.IndexOf('-')) == -1 )
                    //{
                    //    S = S.Insert((S.IndexOf(',')), "-1");
                    //}

                    // This split was also for the original input, but still works
                    // Split the String and Commas AND Dashes
                    String[] SArray = S.Split(new Char[] { ',', '-' }, StringSplitOptions.RemoveEmptyEntries);  // Room.txt contains tab-delimited fields.


                    // Convert some stings to ints
                    // Check if any of the INTS are passed in as NULL
                    {
                        if (SArray[0] != "null")
                        {
                            M0 = Convert.ToInt32(SArray[0]);
                        }
                        else
                        {
                            M0 = -1;
                        }

                        if (SArray[1] != "null")
                        {
                            M1 = Convert.ToInt32(SArray[1]);
                        }
                        else
                        {
                            M1 = -1;
                        }

                        if (SArray[3] != "null")
                        {
                            M3 = Convert.ToInt32(SArray[3]);
                        }
                        else
                        {
                            M3 = -1;
                        }

                        if (SArray[6] != "null")
                        {
                            M6 = Convert.ToInt32(SArray[6]);
                        }
                        else
                        {
                            M6 = -1;
                        }
                    }

                    // If the file has NULL for primary keys - it will display a message box
                    // Except for the "Section"... because the new input file has "section" as null
                    // despite the fact that it MUST be part of the primary key
                    // because there are classes with the same Number

                    // Create the command String
                    String SqlString = "Insert Into ClassTable (Class, Section, Teacher, Room, Time, Days, Enrollment) Values(" +
                                       (M0 == -1 ? "NULL" : M0.ToString()) + ", " +
                                       (M1 == -1 ? "1" : M1.ToString()) + ", " +
                                       (SArray[2] == "null" ? "NULL" : "'" + SArray[2] + "'") + ", " +
                                       (M3 == -1 ? "NULL" : M3.ToString()) + ", " +
                                       (SArray[4] == "null" ? "NULL" : "'" + SArray[4] + "'") + ", " +
                                       (SArray[5] == "null" ? "NULL" : "'" + SArray[5] + "'") + ", " +
                                       (M6 == -1 ? "NULL" : M6.ToString()) + ")";


                    // Output the command to console
                    //Console.WriteLine(SqlString);

                    // Make the command and RUN IT
                    MySqlCommand Command2 = new MySqlCommand(SqlString, connection);
                    Command2.ExecuteNonQuery();
                    // Get a new Line
                    S = SR.ReadLine();
                } // end of while
            }     // end of using for StreamReader
        }
示例#3
0
 public void Do <T, U, V, W, X>(M6 <T, U, V, W, X> m)
 {
     DoAny(m);
 }
示例#4
0
 public void Do <T, U, V, W, X, Y, Z>(M6 <T, U, V, W, X, Y, Z> m)
 {
     DoAny(m);
 }
示例#5
0
 public void Do <T, U, V>(M6 <T, U, V> m)
 {
     DoAny(m);
 }