public void Initialize() { DBHandlerAI = new DBHandlerAI(); DBHandlerDialogue = new DBHandlerDialogue(); //open main db string conn = "URI=file:" + Application.dataPath + "/GameData/Database/Main.s3db"; //Path to database. Debug.Log("Main Database Path is : "+conn); _mainDBConn = (IDbConnection)new SqliteConnection(conn); _mainDBConn.Open(); //Open connection to the database. //open AI db conn = "URI=file:" + Application.dataPath + "/GameData/Database/AI.s3db"; _aiDBConn = (IDbConnection)new SqliteConnection(conn); _aiDBConn.Open(); //Open connection to the database. /* while (reader.Read ()) { int value = reader.GetInt32(0); Debug.Log("value= " + value); } */ //following is a test DBHandlerAI.GetCharacterActionSet(0); DBHandlerDialogue.LoadNPCDialogue(null); }
public void Initialize() { DBHandlerAI = new DBHandlerAI(); DBHandlerDialogue = new DBHandlerDialogue(); DBHandlerStoryEvent = new DBHandlerStoryEvent(); DBHandlerCharacter = new DBHandlerCharacter(); DBHandlerItem = new DBHandlerItem(); DBHandlerEnvironment = new DBHandlerEnvironment(); //open main db string conn = "URI=file:" + Application.dataPath + "/GameData/Database/Main.s3db"; //Path to database. Debug.Log("Main Database Path is : " + conn); _mainDBConn = (IDbConnection) new SqliteConnection(conn); _mainDBConn.Open(); //Open connection to the database. //open AI db conn = "URI=file:" + Application.dataPath + "/GameData/Database/AI.s3db"; _aiDBConn = (IDbConnection) new SqliteConnection(conn); _aiDBConn.Open(); //Open connection to the database. /* * while (reader.Read ()) * { * int value = reader.GetInt32(0); * Debug.Log("value= " + value); * } */ //following is a test DBHandlerAI.GetCharacterActionSet(0); DBHandlerDialogue.LoadNPCDialogue(null); //DBHandlerItem.LoadItemByID("ak47"); }