protected override void Awake() { base.Awake (); #if UNITY_EDITOR PlayerSettings.bundleVersion = buildVersion; // set db // The example does not use the auto-generation db and table(DDL). Sqlite sql = new Sqlite (); if (sql.CreateFile ("hellgate.db")) { sql.CreateTable ("hellgate.db", new Board ().GetType ()); sql.CreateTable ("hellgate.db", new Comment ().GetType ()); } // if (sql.CreateFile ("Hellgate.db")) { // sql.ExecuteNonQuery ("CREATE TABLE `board` ( " + // "`idx` INTEGER PRIMARY KEY AUTOINCREMENT, " + // "`name` TEXT, " + // "`description` TEXT " + // ");"); // } #endif // add BGM SoundManager.Instance.AddBGM (bgm); SoundManager.Instance.PlayBGM (); }
/// <summary> /// Resets the DB. /// </summary> public void ResetDB() { sqlite = new Sqlite(dbName, true); }
/// <summary> /// Initializes a new instance of the <see cref="Hellgate.Query"/> class. /// </summary> /// <param name="db">Database name && path.</param> public Query(string db) { dbName = db; sqlite = new Sqlite (db); }
/// <summary> /// Initializes a new instance of the <see cref="Hellgate.Query"/> class. /// </summary> /// <param name="db">Database name && path.</param> public Query(string db) { dbName = db; sqlite = new Sqlite(db); }
/// <summary> /// Resets the DB. /// </summary> public void ResetDB() { sqlite = new Sqlite (dbName, true); }