Skip to content

Commit

Permalink
PRELOAD FUNCIONANDO PRA FIT E BOLHAS
Browse files Browse the repository at this point in the history
  • Loading branch information
Clauvin committed May 23, 2016
1 parent bb0d1cc commit 4121833
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
16 changes: 11 additions & 5 deletions Assets/Resources/Scripts/Atuais/NovoLeitor2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public bool LoadStuffFIT(int tempo_minimo = 0, int tempo_maximo = int.MaxValue)

}

public bool LoadStuffBolhas()
public bool LoadStuffBolhas(int tempo_minimo = 0, int tempo_maximo = int.MaxValue)
{
//number of HeatMaps
//no caso do Bolhas, 1 + Mouse mais 4 objetos = 6
Expand Down Expand Up @@ -239,25 +239,30 @@ public bool LoadStuffBolhas()

if ((entries.Length == 7) && (((string)entries[1]) == "Mouse"))
{
int tempo = Int32.Parse(entries[0].Split(':')[1]);
int checando_tempo_do_log = Int32.Parse(entries[0].Split(':')[1]);

//Os splits dividem os strings entre antes e depois dos ':' presentes
//Daí é só pegar o dado necessário, e não sua legenda.
bd_bolhas.AddMouse(tempo,
if ((tempo_minimo <= checando_tempo_do_log) && (checando_tempo_do_log <= tempo_maximo))
{
bd_bolhas.AddMouse(checando_tempo_do_log,
entries[1].ToString(),
Int32.Parse(entries[2].Split(':')[1]),
Int32.Parse(entries[3].Split(':')[1]),
entries[4].Split(':')[1].ToString(),
entries[5].Split(':')[1].ToString(),
entries[6].Split(':')[1].ToString());
}

} else if ((entries.Length == 11) && (((string)entries[1]) == "Objeto"))
{
int tempo = Int32.Parse(entries[0].Split(':')[1]);
int checando_tempo_do_log = Int32.Parse(entries[0].Split(':')[1]);

//Os splits dividem os strings entre antes e depois dos ':' presentes
//Daí é só pegar o dado necessário, e não sua legenda.
bd_bolhas.AddObjeto(Int32.Parse(entries[0].Split(':')[1]),
if ((tempo_minimo <= checando_tempo_do_log) && (checando_tempo_do_log <= tempo_maximo))
{
bd_bolhas.AddObjeto(Int32.Parse(entries[0].Split(':')[1]),
entries[1].ToString(),
Int32.Parse(entries[2].Split(':')[1]),
Int32.Parse(entries[3].Split(':')[1]),
Expand All @@ -268,6 +273,7 @@ public bool LoadStuffBolhas()
entries[8].Split(':')[1].ToString(),
entries[9].Split(':')[1].ToString(),
entries[10].Split(':')[1].ToString());
}
}

#if (DEBUG)
Expand Down
9 changes: 6 additions & 3 deletions Assets/Resources/Scripts/Atuais/NovoLeitorBolhas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ public class NovoLeitorBolhas : NovoLeitor2
void Start()
{
NovoLeitor2Init();
if (pegar_endereco_de_log.FindFile())
PassadorDeDados pd = FindObjectOfType<PassadorDeDados>();
if (pd.endereco_do_arquivo != "")
{
pegar_endereco_de_log.endereco_de_arquivo = pd.endereco_do_arquivo;
pegar_endereco_de_log.CriarIniDeUltimoLogChecado(pd.endereco_do_arquivo);
pegar_endereco_de_log.CriarIniDeUltimoLogChecado(pegar_endereco_de_log.endereco_de_arquivo);
StartBolhas();
//LoadStuffBolhas(10, 30);
LoadStuffBolhas();
LoadStuffBolhas(pd.tempo_minimo, pd.tempo_maximo);
CreateStuffBolhas();
GetComponent<Controlador>().InicializacaoBolhas();
pd.Destruir();
}
else
{
Expand Down

0 comments on commit 4121833

Please sign in to comment.