Skip to content

Commit

Permalink
🔧 minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienjuif committed Nov 23, 2023
1 parent 90d1f0c commit 645c696
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion camera/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Camera {
pub fn new_default(target: Entity) -> Self {
Self {
target,
dead_zone: Vec2::new(100.0, 80.0),
dead_zone: Vec2::new(30.0, 15.0),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use bevy::{
prelude::*,
DefaultPlugins,
};
use bevy_camera::{CameraDebugPlugin, CameraPlugin};
use bevy_camera::CameraPlugin;
use bevy_rapier2d::prelude::*;
use castles::CastlesPlugin;
use health::HealthPlugin;
Expand Down Expand Up @@ -42,7 +42,7 @@ fn main() {
// --- camera ---
.add_plugins((
CameraPlugin,
CameraDebugPlugin,
// CameraDebugPlugin,
))
// --- physics ---
.add_plugins((
Expand Down
6 changes: 5 additions & 1 deletion src/racks.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::time::Duration;

use bevy::{
prelude::*,
sprite::{Sprite, SpriteBundle},
Expand Down Expand Up @@ -41,6 +43,8 @@ pub struct RackBundle {
impl RackBundle {
pub fn new(team: Team, transform: Transform) -> Self {
let size = Vec2::new(20.0, 20.0);
let mut minion_spawn_timer = Timer::from_seconds(1.5, TimerMode::Repeating);
minion_spawn_timer.set_elapsed(Duration::from_secs_f32(1.0));
RackBundle {
sprite_bundle: SpriteBundle {
sprite: Sprite {
Expand All @@ -56,7 +60,7 @@ impl RackBundle {
minion_spawning: false,
minion_spawned_count: 0,
minion_spawn_count: 5,
minion_spawn_timer: Timer::from_seconds(3., TimerMode::Repeating),
minion_spawn_timer,
minion_spawn_timer_q: Timer::from_seconds(0.2, TimerMode::Repeating),
},
health: Health::new(220.)
Expand Down

0 comments on commit 645c696

Please sign in to comment.