Commit 2e3c686b authored by Tim Scheiber's avatar Tim Scheiber

finished level

parent 6e9d11d0
{ {
// Informationen zu dieser Datei finden Sie unter https://go.microsoft.com//fwlink//?linkid=834763.
"configurations": [ "configurations": [
{ {
"name": "x64-Debug", "name": "x64-Debug",
...@@ -10,7 +9,20 @@ ...@@ -10,7 +9,20 @@
"installRoot": "${projectDir}\\out\\install\\${name}", "installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "", "cmakeCommandArgs": "",
"buildCommandArgs": "-v", "buildCommandArgs": "-v",
"ctestCommandArgs": "" "ctestCommandArgs": "",
"variables": []
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
} }
] ]
} }
\ No newline at end of file
...@@ -3,14 +3,14 @@ tileset ...@@ -3,14 +3,14 @@ tileset
###########################################-############# ###########################################-#############
##########################################|!|############ ##########################################|!|############
########################################--} {--########## ########################################--} {--##########
#######################################| hbh |######### #######################################| b |#########
#######################################|3 7|######### #######################################|3 7|#########
#######################################| h |######### #######################################| |#########
#######################################| |######### #######################################| |#########
#######################################| c |######### #######################################| c |#########
#######################################| ~ |######### #######################################| ~ |#########
#######################################| |######### #######################################| |#########
########################################--]@[--########## ########################################--] [--##########
##########################################| |############ ##########################################| |############
###################################-------} |############ ###################################-------} |############
##################################| |############ ##################################| |############
...@@ -20,7 +20,7 @@ tileset ...@@ -20,7 +20,7 @@ tileset
####################-----#########| |############ ####################-----#########| |############
######---####-----#|> >|########| [-------############# ######---####-----#|> >|########| [-------#############
##---} 7{--} 5 {} |######--} {--################## ##---} 7{--} 5 {} |######--} {--##################
#| 5 |#####| |################# #|@ 5 |#####| |#################
##---] 7[--] 1 [] |#####| |################# ##---] 7[--] 1 [] |#####| |#################
######---####-----#|> >|#####| h i |################# ######---####-----#|> >|#####| h i |#################
####################-] [-######| |################# ####################-] [-######| |#################
......
...@@ -36,11 +36,11 @@ namespace phase_shifter::gameplay { ...@@ -36,11 +36,11 @@ namespace phase_shifter::gameplay {
float spawn_offset = 0; // offset of the bullet spawn point in meters float spawn_offset = 0; // offset of the bullet spawn point in meters
float attack_radius = 0; // radius in which the turret targets the target float attack_radius = 0; // radius in which the turret targets the target
unsigned int pause_between_shots = 0; // number of beats the turret waits between shots unsigned int pause_between_shots = 0; // number of beats the turret waits between shots
unsigned int wait_beats = 0; // number of beats the turret waits before shooting again
float target_direction = 0; // angular direction towards the target in degrees with 0° beeing North (-Z) float target_direction = 0; // angular direction towards the target in degrees with 0° beeing North (-Z)
std::vector<Bulletpattern> patterns; // sequence of bullet patterns that are looped through std::vector<Bulletpattern> patterns; // sequence of bullet patterns that are looped through
float rotation = 0; // current rotation from default_orientation in degrees float rotation = 0; // current rotation from default_orientation in degrees
unsigned int wait_beats = 0; // number of beats the turret waits before shooting again
bool rotate = false; //flag whether the turret will rotate next beat bool rotate = false; //flag whether the turret will rotate next beat
bool idle = true; // if false, the turret targets the target bool idle = true; // if false, the turret targets the target
...@@ -48,6 +48,6 @@ namespace phase_shifter::gameplay { ...@@ -48,6 +48,6 @@ namespace phase_shifter::gameplay {
unsigned int i_next_pattern = 0; unsigned int i_next_pattern = 0;
}; };
sf2_structDef(Shooting_comp, default_orientation, rotation_per_step, max_rotation, spawn_offset, attack_radius, pause_between_shots); sf2_structDef(Shooting_comp, default_orientation, rotation_per_step, max_rotation, spawn_offset, attack_radius, pause_between_shots, wait_beats);
} }
\ No newline at end of file
...@@ -299,8 +299,9 @@ namespace phase_shifter::level { ...@@ -299,8 +299,9 @@ namespace phase_shifter::level {
.post_create([=](auto entity) { .post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) { entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.default_orientation = 180; shooting.default_orientation = 180;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern( shooting.set_patterns({gameplay::Bulletpattern(
{{0, 0}, {25, -8}, {-25, 8}, {50, -8}, {-50, 8}})}); {{0, 0}, {30, -7}, {-30, 7}, {60, -5}, {-60, 5}})});
}); });
}) })
.create(); .create();
...@@ -312,9 +313,8 @@ namespace phase_shifter::level { ...@@ -312,9 +313,8 @@ namespace phase_shifter::level {
.post_create([=](auto entity) { .post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) { entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.default_orientation = 0; shooting.default_orientation = 0;
shooting.rotation_per_step = 15; shooting.pause_between_shots = 2;
shooting.max_rotation = 30; shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {10, 5}, {-10, 5}})});
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {20, 0}, {-20, 0}})});
}); });
}) })
.create(); .create();
...@@ -346,6 +346,7 @@ namespace phase_shifter::level { ...@@ -346,6 +346,7 @@ namespace phase_shifter::level {
.post_create([=](auto entity) { .post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) { entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.default_orientation = 135; shooting.default_orientation = 135;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {25, 0}, {-25, 0}})}); shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {25, 0}, {-25, 0}})});
}); });
}) })
...@@ -358,6 +359,7 @@ namespace phase_shifter::level { ...@@ -358,6 +359,7 @@ namespace phase_shifter::level {
.post_create([=](auto entity) { .post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) { entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.default_orientation = 225; shooting.default_orientation = 225;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {25, 0}, {-25, 0}})}); shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {25, 0}, {-25, 0}})});
}); });
}) })
...@@ -385,6 +387,7 @@ namespace phase_shifter::level { ...@@ -385,6 +387,7 @@ namespace phase_shifter::level {
entity.process([&](gameplay::Shooting_comp& shooting) { entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.rotation_per_step = 360.f / 16.f; shooting.rotation_per_step = 360.f / 16.f;
shooting.max_rotation = -1; shooting.max_rotation = -1;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, shooting.set_patterns({gameplay::Bulletpattern({{0, 0},
{20, 0}, {20, 0},
{-20, 0}, {-20, 0},
...@@ -405,7 +408,8 @@ namespace phase_shifter::level { ...@@ -405,7 +408,8 @@ namespace phase_shifter::level {
.post_create([=](auto entity) { .post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) { entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.rotation_per_step = -360.f / 16.f; shooting.rotation_per_step = -360.f / 16.f;
shooting.max_rotation = -1; shooting.max_rotation = -1;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, shooting.set_patterns({gameplay::Bulletpattern({{0, 0},
{20, 0}, {20, 0},
{-20, 0}, {-20, 0},
...@@ -428,6 +432,7 @@ namespace phase_shifter::level { ...@@ -428,6 +432,7 @@ namespace phase_shifter::level {
shooting.default_orientation = 0; shooting.default_orientation = 0;
shooting.rotation_per_step = -360.f / 16.f; shooting.rotation_per_step = -360.f / 16.f;
shooting.max_rotation = -1; shooting.max_rotation = -1;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, shooting.set_patterns({gameplay::Bulletpattern({{0, 0},
{45, 0}, {45, 0},
{90, 0}, {90, 0},
......
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