Esempio n. 1
0
        private void createTable()
        {
            string query = "CREATE TABLE IF NOT EXISTS " + UPGRADE_TABLE_NAME + " ( " +
                           UNIT_ID + INTEGER + NOT_NULL + SEPARATOR +
                           LEVEL + INTEGER + NOT_NULL + SEPARATOR +
                           GROUND_ATTACK_PLUS + INTEGER + SEPARATOR +
                           AIR_ATTACK_PLUS + INTEGER + SEPARATOR +
                           HEALTH_PLUS + INTEGER + SEPARATOR +
                           PRICE + INTEGER + SEPARATOR +
                           MIN_USER_LEVEL + INTEGER + SEPARATOR +
                           PRIMARY_KEY + "(" + UNIT_ID + SEPARATOR + LEVEL + ")" +
                           " ) ";

//            while (SQLManager.instance == null)
//            {
//                yield return new WaitForEndOfFrame();
//            }
            sqlManager.execute(query);
        }
        public void createTable()
        {
            string query = "CREATE TABLE IF NOT EXISTS " + UNIT_TABLE_NAME + " ( " +
                           UNIT_ID_COL + INTEGER + NOT_NULL + PRIMARY_KEY + SEPARATOR +
                           UNIT_NAME_COL + VARCHAR + NOT_NULL + SEPARATOR +
                           UNIT_POWER_SPAWN_COL + INTEGER + SEPARATOR +
                           UNIT_POWER_MOVE_COL + INTEGER + SEPARATOR +
                           UNIT_POWER_ATTACK_COL + INTEGER + SEPARATOR +
                           UNIT_POWER_REGEN_COL + FLOAT + SEPARATOR +
                           UNIT_AIR_DAMAGE_COL + INTEGER + SEPARATOR +
                           UNIT_GROUND_DAMAGE_COL + INTEGER + SEPARATOR +
                           UNIT_ARMOR_PRICISING_DAMAGE_POINT + FLOAT + SEPARATOR +
                           UNIT_SPLASH_DAMAGE_POINT_COL + INTEGER + SEPARATOR +
                           UNIT_HEALTH_COL + INTEGER + SEPARATOR +
                           UNIT_IS_ARMORED_COL + BOOLEAN + SEPARATOR +
                           UNIT_IS_GROUND_COL + BOOLEAN + SEPARATOR +
                           UNIT_IS_LOCKED_COL + BOOLEAN + SEPARATOR +
                           UNIT_IS_IN_DECK_COL + BOOLEAN + SEPARATOR +
                           UNIT_WIDTH_COL + FLOAT + SEPARATOR +
                           UNIT_HEIGHT_COL + FLOAT + SEPARATOR +
                           UNIT_VISION_COL + INTEGER + SEPARATOR +
                           UNIT_REQUIRED_LEVEL_COL + INTEGER + SEPARATOR +
                           UNIT_COIN_COST + INTEGER + SEPARATOR +
                           UNIT_CURRENT_LEVEL_COL + INTEGER + SEPARATOR +
                           UNIT_LAST_MODIFIED_COL + INTEGER + SEPARATOR +
                           UNIT_MOVE_SPEED_COL + INTEGER + SEPARATOR +
                           UNIT_DESCRIPTION_COL + VARCHAR + SEPARATOR +
                           UNIT_IS_VEHICLE_COL + BOOLEAN + SEPARATOR +
                           UNIT_SHOT_PER_TURN + INTEGER +
                           //SEPARATOR +
                           //UNIT_NUMBER_OF_STATE_IMAGES + INTEGER + SEPARATOR +
                           //UNIT_NUMBER_OF_DIRECTIONS + INTEGER +
                           " ) ";

            sqlManager.execute(query);
        }