Commit 6df9bb59 authored by Kevin Balz's avatar Kevin Balz
Browse files

Bullet Hell

parent 67c7b301
Pipeline #3371 failed with stage
in 2 minutes and 32 seconds
dummy
################################
#|------------------|#|-------|#
#| - h h h|#| G |#
#| p h hhh h|#| |#
#| h h h|#| -- |#
#|-------------| |#| --h-- |#
####|----------|h |#| h -- |#
####| b b |#| h |#
####| b b h|#| -- |#
#| - b b b|#| G |#
#| p b bbb b|#| |#
#| b b b|#| -- |#
#|-------------| |#| --b-- |#
####|----------|b |#| b -- |#
####| b b |#| b |#
####| b b b|#| -- |#
####|b |-------| |#| -- |#
####| |-------|h |-| h |#
####| h h h |#
####| h h h h h - |#
####| h h h h |#
####| |-------|b |-| b |#
####| b b b |#
####| b b b b b - |#
####| b b b b |#
####|-------------------------|#
################################
\ No newline at end of file
#include "level_system.hpp"
#include "../gameplay/movement_comp.hpp"
#include "../gameplay/Fixed_path_comp.hpp"
#include "../gameplay/Shooting_comp.hpp"
#include "../gameplay/player_comp.hpp"
#include "../gameplay/rigid_body_comp.hpp"
#include "../gameplay/viewtarget_comp.hpp"
......@@ -53,6 +55,20 @@ namespace phase_shifter::level {
.emplace<helper::Attachment_comp>(camera.handle(),
glm::rotate(sun_dir, glm::vec3(0, 0, 1)) * 40.f);
});
_spawners.emplace("b", [&](const Tile& tile, const glm::vec3& position) {
mirrage::ecs::Entity_facet enemy =
_entities.entity_builder(tile.spawns).position(position)
.post_create([=](auto entity) {
entity.process(
[&](gameplay::Fixed_path_comp& fixed_path) { fixed_path.update_path({}); });
entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}})});
});
}).create();
});
}
auto Level_system::update(const mirrage::util::Time& time) -> void {}
......
......@@ -89,7 +89,7 @@ namespace phase_shifter {
LOG(plog::info) << "Renderer Memory usage: " << msg.str();
}
});
_level_system->load("dummy");
_level_system->load("proto");
auto bg_music = engine.assets().load<std::shared_ptr<eam::opus>>("music:pulse"_aid).get_blocking();
_music = engine.audio().generate_context_ptr(bg_music);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment