Clean jellyfish
This commit is contained in:
parent
602f600379
commit
8c8d0ab595
@ -28,7 +28,7 @@ impl EnemyBase for JellyFish {
|
|||||||
fn render(
|
fn render(
|
||||||
&mut self,
|
&mut self,
|
||||||
context_2d: &mut raylib::prelude::RaylibMode2D<raylib::prelude::RaylibDrawHandle>,
|
context_2d: &mut raylib::prelude::RaylibMode2D<raylib::prelude::RaylibDrawHandle>,
|
||||||
player: &mut Player,
|
_player: &mut Player,
|
||||||
resources: &mut GlobalResources,
|
resources: &mut GlobalResources,
|
||||||
dt: f64,
|
dt: f64,
|
||||||
) {
|
) {
|
||||||
@ -77,7 +77,7 @@ impl EnemyBase for JellyFish {
|
|||||||
&& !is_jelly_stunned;
|
&& !is_jelly_stunned;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_logic(&mut self, player: &mut Player, dt: f64) {
|
fn handle_logic(&mut self, player: &mut Player, _dt: f64) {
|
||||||
// Handle stunning the player
|
// Handle stunning the player
|
||||||
if self.do_stun_player {
|
if self.do_stun_player {
|
||||||
if self.position.distance_to(player.position).abs() <= JELLYFISH_STUN_REACH {
|
if self.position.distance_to(player.position).abs() <= JELLYFISH_STUN_REACH {
|
||||||
@ -86,7 +86,7 @@ impl EnemyBase for JellyFish {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_getting_attacked(&mut self, stun_duration: f64, current_time: f64) {
|
fn handle_getting_attacked(&mut self, stun_duration: f64, _current_time: f64) {
|
||||||
self.stunned_timer = stun_duration;
|
self.stunned_timer = stun_duration;
|
||||||
self.max_stunned_time = stun_duration;
|
self.max_stunned_time = stun_duration;
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ impl EnemyBase for Octopus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_logic(&mut self, player: &mut crate::player::Player, dt: f64) {
|
fn handle_logic(&mut self, player: &mut crate::player::Player, _dt: f64) {
|
||||||
if self.suck_air_time_remaining > 0.0 && !self.has_taken_air_from_player {
|
if self.suck_air_time_remaining > 0.0 && !self.has_taken_air_from_player {
|
||||||
if player.position.distance_to(self.current_position).abs() <= OCTOPUS_SUCK_AIR_RANGE {
|
if player.position.distance_to(self.current_position).abs() <= OCTOPUS_SUCK_AIR_RANGE {
|
||||||
// Take air from the player
|
// Take air from the player
|
||||||
|
Reference in New Issue
Block a user