Skip to content

Commit

Permalink
Entrega 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Salomé Tredici committed Jun 12, 2019
1 parent 818009c commit e8e404a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
18 changes: 11 additions & 7 deletions CShark/Jugador/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private void CrearCapsula()
}

float Velocidad = 5000f;
float Salto = 5f;
float Salto = 2.5f;
float Flote = 200f;

public void AumentarOxigeno()
Expand Down Expand Up @@ -237,14 +237,18 @@ public void CheatValor(GameModel game, string opcion)
switch (opcion)
{
case "Vida":
Vida = Vida < HUD.Instancia.BarraVida.ValorMaximo ?
Vida += 500f * game.ElapsedTime :
Vida;
var vidaMax = HUD.Instancia.BarraVida.ValorMaximo;
Vida = vidaMax;
//Vida = Vida < vidaMax ?
// Vida += (vidaMax - Vida) : //* game.ElapsedTime :
// Vida;
break;
case "Oxigeno":
Oxigeno = Oxigeno < HUD.Instancia.BarraOxigeno.ValorMaximo ?
Oxigeno += 500f * game.ElapsedTime :
Oxigeno;
var oxigenoMax = HUD.Instancia.BarraOxigeno.ValorMaximo;
Oxigeno = oxigenoMax;
//Oxigeno = Oxigeno < oxigenoMax ?
// Oxigeno += (Oxigeno - oxigenoMax) ://* game.ElapsedTime :
// Oxigeno;
break;
}
}
Expand Down
8 changes: 4 additions & 4 deletions CShark/Managers/MenuManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ public void Initialize() {

MenuOpciones.AgregarCheckbox(config.MostrarRayo);
MenuOpciones.AgregarCheckbox(config.ModoDios);
MenuOpciones.AgregarCheckbox(config.Niebla);
//MenuOpciones.AgregarCheckbox(config.Niebla);
MenuOpciones.AgregarCheckbox(config.PostProcesadoCasco);
MenuOpciones.AgregarCheckbox(config.MotionBlur);
//MenuOpciones.AgregarCheckbox(config.MotionBlur);
MenuOpciones.AgregarBoton("Volver", j => j.CambiarMenu(TipoMenu.Principal));

MenuVariables.AgregarSlider(config.VelocidadRotacion, 0.05f, 0.2f);
MenuVariables.AgregarSlider(config.VelocidadMovimiento, 200, 1000);
MenuVariables.AgregarBoton("Volver", j => j.CambiarMenu(TipoMenu.Principal));

MenuCheats.AgregarBoton("Items +10", j => j.CheatItems());
MenuCheats.AgregarBoton("Vida +500", j => j.CheatValor("Vida"));
MenuCheats.AgregarBoton("Oxígeno +500", j => j.CheatValor("Oxigeno"));
MenuCheats.AgregarBoton("Fill Vida", j => j.CheatValor("Vida"));
MenuCheats.AgregarBoton("Fill Oxígeno", j => j.CheatValor("Oxigeno"));
MenuCheats.AgregarBoton("Fill vida/oxígeno", j => j.FillAll());
MenuCheats.AgregarBoton("Volver", j => j.CambiarMenu(TipoMenu.Principal));
}
Expand Down
1 change: 1 addition & 0 deletions CShark/Model/GameModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public override void Dispose()
GameManager.Dispose();
Mapa.Instancia.Dispose();
GameManager.Dispose();
EffectsPlayer.Dispose();
}

#region Logic
Expand Down

0 comments on commit e8e404a

Please sign in to comment.