diff --git a/assets/texture/receiver_boss.png b/assets/texture/receiver_boss.png deleted file mode 100644 index 901d61b..0000000 Binary files a/assets/texture/receiver_boss.png and /dev/null differ diff --git a/assets/texture/repeater_boss.png b/assets/texture/repeater_boss.png new file mode 100644 index 0000000..b077598 Binary files /dev/null and b/assets/texture/repeater_boss.png differ diff --git a/assets/texture/spritesheet.png b/assets/texture/spritesheet.png index 1013c80..55cd741 100644 Binary files a/assets/texture/spritesheet.png and b/assets/texture/spritesheet.png differ diff --git a/assets/texture/spritesheet.ron b/assets/texture/spritesheet.ron index 8cc2670..c3ee827 100644 --- a/assets/texture/spritesheet.ron +++ b/assets/texture/spritesheet.ron @@ -104,5 +104,11 @@ width: 12, height: 12, ), + ( + x: 56, + y: 47, + width: 7, + height: 7, + ), ], ) \ No newline at end of file diff --git a/src/entities/enemy_spawner.rs b/src/entities/enemy_spawner.rs index 9db0dbf..ad82ab8 100644 --- a/src/entities/enemy_spawner.rs +++ b/src/entities/enemy_spawner.rs @@ -26,7 +26,8 @@ const CONSUMABLE_SPEED: f32 = 35.0; const CONSUMABLE_HEALTH_RATIO: usize = 22; const CONSUMABLE_DEFENSE_RATIO: usize = 3; -const CONSUMABLE_MONEY_RATIO: usize = 75; +const CONSUMABLE_MONEY_1_RATIO: usize = 70; +const CONSUMABLE_MONEY_5_RATIO: usize = 5; const ENEMY_HEIGHT: f32 = 18.0; const ENEMY_WIDTH: f32 = 18.0; @@ -58,7 +59,9 @@ const HAULER_SPRITE_INDEX: usize = 15; const HEALTH_CONSUMABLE_SPRITE_INDEX: usize = 13; const DEFENSE_CONSUMABLE_SPRITE_INDEX: usize = 14; -const MONEY_CONSUMABLE_SPRITE_INDEX: usize = 16; +const MONEY_1_CONSUMABLE_SPRITE_INDEX: usize = 17; +const MONEY_5_CONSUMABLE_SPRITE_INDEX: usize = 16; + const SPAWNER_Y_OFFSET: f32 = 20.0; @@ -74,8 +77,11 @@ pub fn initialise_enemy_spawner(world: &mut World) { for _ in 0..CONSUMABLE_DEFENSE_RATIO { consumables_list.push("defense".to_string()); } - for _ in 0..CONSUMABLE_MONEY_RATIO { - consumables_list.push("money".to_string()); + for _ in 0..CONSUMABLE_MONEY_1_RATIO { + consumables_list.push("money_1".to_string()); + } + for _ in 0..CONSUMABLE_MONEY_5_RATIO { + consumables_list.push("money_5".to_string()); } let health_consumable = Consumable { @@ -102,22 +108,35 @@ pub fn initialise_enemy_spawner(world: &mut World) { speed: CONSUMABLE_SPEED, }; - let money_consumable = Consumable { + let money_1_consumable = Consumable { + width: 7.0, + height: 7.0, + hitbox_width: 6.0, + hitbox_height: 6.0, + health_value: 0.0, + defense_value: 0.0, + money_value: 1, + sprite_index: MONEY_1_CONSUMABLE_SPRITE_INDEX, + speed: CONSUMABLE_SPEED, + }; + + let money_5_consumable = Consumable { width: CONSUMABLE_WIDTH, height: CONSUMABLE_HEIGHT, hitbox_width: CONSUMABLE_HITBOX_WIDTH, hitbox_height: CONSUMABLE_HITBOX_HEIGHT, health_value: 0.0, defense_value: 0.0, - money_value: 1, - sprite_index: MONEY_CONSUMABLE_SPRITE_INDEX, + money_value: 5, + sprite_index: MONEY_5_CONSUMABLE_SPRITE_INDEX, speed: CONSUMABLE_SPEED, }; let mut consumables = HashMap::new(); consumables.insert("health".to_string(), health_consumable); consumables.insert("defense".to_string(), defense_consumable); - consumables.insert("money".to_string(), money_consumable); + consumables.insert("money_1".to_string(), money_1_consumable); + consumables.insert("money_5".to_string(), money_5_consumable); //create consumable pools for enemies let standard_pool = Pool {