コード例 #1
0
 void Start()
 {
     info  = Camera.main.GetComponent <Info>();
     db    = Camera.main.GetComponent <Dbconnect>();
     _conn = "URI=file:" + Application.dataPath + "/VRdb.s3db"; //Path to database.
     db.set_connection(_conn);
 }
コード例 #2
0
    public void drop_player()
    {
        int       index = transform.GetSiblingIndex();
        Dbconnect bd    = Camera.main.GetComponent <Dbconnect>();

        //Debug.Log(bd._items[index]._id);
        _conn = "URI=file:" + Application.dataPath + "/VRdb.s3db"; //Path to database.
        set_connection(_conn);
        _sqlQuery = "DELETE FROM results WHERE id_player='" + bd._items[index]._id + "'";
        edit_data(_sqlQuery);
        _sqlQuery = "DELETE FROM users WHERE id_player='" + bd._items[index]._id + "'";
        edit_data(_sqlQuery);
        bd._items.RemoveAt(index);
        Functions f = Camera.main.GetComponent <Functions>();

        f.UpdateScroll();
    }
コード例 #3
0
 void Start()
 {
     db = Camera.main.GetComponent <Dbconnect>();
 }
コード例 #4
0
ファイル: Graph.cs プロジェクト: Gameification/VRrehubility
 // Start is called before the first frame update
 void Start()
 {
     db         = Camera.main.GetComponent <Dbconnect>();
     lr         = GameObject.Find("Graph").GetComponent <LineRenderer>();
     graphStart = lr.transform.GetChild(0);
 }