public static void DbLoad() { SQLiteDataReader reader; reader = Conexao.LoadData("select * from configuracoes"); while (reader.Read()) { switch (Convert.ToInt32(reader["id"])) { case 1: if (Convert.ToBoolean(reader["valor"])) { Screen.Fullscreen(true, false); } break; case 2: Configuracoes.VSync(Convert.ToBoolean(reader["valor"]), false); break; } } reader = Conexao.LoadData("select * from item"); while (reader.Read()) { V.itens.Add(new Item(Convert.ToInt32(reader["id"]), Convert.ToInt32(reader["sprite"]), Convert.ToString(reader["nome"]), Convert.ToString(reader["descricao"]), Convert.ToString(reader["categoria"]), Convert.ToInt32(reader["efeito"]))); } reader = Conexao.LoadData("select * from recurso"); while (reader.Read()) { V.recursos.Add(new Recurso(Convert.ToInt32(reader["id"]), Convert.ToString(reader["nome"]), Convert.ToString(reader["descricao"]), Convert.ToInt32(reader["sprite"]))); } reader = Conexao.LoadData("select * from mapa"); while (reader.Read()) { LoadFileState.mapas.Add(Convert.ToString(reader["nome"])); } skills.Add(new Skill("Attack", "attack", 1, 30, 20)); skills.Add(new Skill("Heal", "heal", 1, 30, 20)); skills.Add(new Skill("Envenenado", "status", 1, 0, 20)); skills.Add(new Skill("Paralisado", "status", 1, 1, 20)); skills.Add(new Skill("Fraqueza", "status", 1, 2, 20)); skills.Add(new Skill("Confuso", "status", 1, 3, 20)); puzzleObjects.Add(new Puzzle("Estrela", "-", "Vermelho")); puzzleObjects.Add(new Puzzle("-", "2", "Azul")); puzzleObjects.Add(new Puzzle("-", "1", "-")); puzzleObjects.Add(new Puzzle("-", "-", "Verde")); puzzleObjects.Add(new Puzzle("-", "1", "Amarelo")); puzzleObjects.Add(new Puzzle("Quadrado", "-", "-")); puzzleObjects.Add(new Puzzle("Losango", "4", "-")); puzzleObjects.Add(new Puzzle("Triângulo", "-", "-")); puzzle2.Add(new Puzzle("Estrela", "1", "Vermelho")); puzzle2.Add(new Puzzle("Quadrado", "2", "Azul")); puzzle2.Add(new Puzzle("Triângulo", "3", "Verde")); puzzle2.Add(new Puzzle("Losango", "4", "Verde")); puzzle2.Add(new Puzzle("Estrela", "3", "Vermelho")); puzzle2.Add(new Puzzle("Quadrado", "1", "Amarelo")); puzzle2.Add(new Puzzle("Triângulo", "2", "Azul")); puzzle2.Add(new Puzzle("Losango", "4", "Amarelo")); }