This commit is contained in:
Silas Bartha 2022-04-03 23:26:19 -04:00
parent cd5bb81f23
commit 064d14f97e
No known key found for this signature in database
GPG Key ID: 9323054A4EA1EA6C

View File

@ -196,7 +196,7 @@ impl PlayableScene {
let current_temperature = self.world_map.sample_temperature_at( let current_temperature = self.world_map.sample_temperature_at(
self.player.position.component_mul(&na::Vector2::new(1.0, -1.0)) self.player.position.component_mul(&na::Vector2::new(1.0, -1.0))
); );
let mut current_temperature_val: f32 = 1.0; let mut current_temperature_val: f32 = -247.51879;
if let Some(val) = current_temperature { if let Some(val) = current_temperature {
current_temperature_val = val; current_temperature_val = val;
} }
@ -244,7 +244,7 @@ impl PlayableScene {
// 32, // 32,
// Color::BLACK, // Color::BLACK,
// ); // );
let melt_amount = constants.player.melt_speed * (current_temperature_val)/(-247.51879); let melt_amount = (current_temperature_val)/(-247.51879);
draw.draw_text( draw.draw_text(
format!("Funny Temperature: ({})[{}]", current_temperature_val, melt_amount).as_str(), format!("Funny Temperature: ({})[{}]", current_temperature_val, melt_amount).as_str(),
@ -378,7 +378,8 @@ impl PlayableScene {
current_temperature_val = val - 273.15; current_temperature_val = val - 273.15;
} }
let melt_amount = constants.player.melt_speed * (-247.51879)/(current_temperature_val); let melt_amount = constants.player.melt_speed * (current_temperature_val)/(-247.51879);
player.size -= melt_amount * delta_time; player.size -= melt_amount * delta_time;
self.update_camera(raylib); self.update_camera(raylib);