...
 
Commits (4)
{
// Informationen zu dieser Datei finden Sie unter https://go.microsoft.com//fwlink//?linkid=834763.
"configurations": [
{
"name": "x64-Debug",
......@@ -10,7 +9,20 @@
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"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
###########################################-#############
##########################################|!|############
########################################--} {--##########
#######################################| hbh |#########
#######################################| b |#########
#######################################|3 7|#########
#######################################| h |#########
#######################################| |#########
#######################################| |#########
#######################################| c |#########
#######################################| ~ |#########
#######################################| |#########
########################################--]@[--##########
########################################--] [--##########
##########################################| |############
###################################-------} |############
##################################| |############
......@@ -20,7 +20,7 @@ tileset
####################-----#########| |############
######---####-----#|> >|########| [-------#############
##---} 7{--} 5 {} |######--} {--##################
#| 5 |#####| |#################
#|@ 5 |#####| |#################
##---] 7[--] 1 [] |#####| |#################
######---####-----#|> >|#####| h i |#################
####################-] [-######| |#################
......
Subproject commit 57bcafb5c858c315b9b8cfc00624505d46ea91a0
Subproject commit d997d0e29bbbbe10a5eb9c211f8131a8e46135b0
......@@ -36,11 +36,11 @@ namespace phase_shifter::gameplay {
float spawn_offset = 0; // offset of the bullet spawn point in meters
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 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)
std::vector<Bulletpattern> patterns; // sequence of bullet patterns that are looped through
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 idle = true; // if false, the turret targets the target
......@@ -48,6 +48,6 @@ namespace phase_shifter::gameplay {
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 {
.post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.default_orientation = 180;
shooting.pause_between_shots = 2;
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();
......@@ -312,9 +313,8 @@ namespace phase_shifter::level {
.post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.default_orientation = 0;
shooting.rotation_per_step = 15;
shooting.max_rotation = 30;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {20, 0}, {-20, 0}})});
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {10, 5}, {-10, 5}})});
});
})
.create();
......@@ -346,6 +346,7 @@ namespace phase_shifter::level {
.post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.default_orientation = 135;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {25, 0}, {-25, 0}})});
});
})
......@@ -358,6 +359,7 @@ namespace phase_shifter::level {
.post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.default_orientation = 225;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0}, {25, 0}, {-25, 0}})});
});
})
......@@ -385,6 +387,7 @@ namespace phase_shifter::level {
entity.process([&](gameplay::Shooting_comp& shooting) {
shooting.rotation_per_step = 360.f / 16.f;
shooting.max_rotation = -1;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0},
{20, 0},
{-20, 0},
......@@ -405,7 +408,8 @@ namespace phase_shifter::level {
.post_create([=](auto entity) {
entity.process([&](gameplay::Shooting_comp& shooting) {
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},
{20, 0},
{-20, 0},
......@@ -428,6 +432,7 @@ namespace phase_shifter::level {
shooting.default_orientation = 0;
shooting.rotation_per_step = -360.f / 16.f;
shooting.max_rotation = -1;
shooting.pause_between_shots = 2;
shooting.set_patterns({gameplay::Bulletpattern({{0, 0},
{45, 0},
{90, 0},
......