Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Sommersemester 2019
Cpp
PhaseShifter
Commits
619ca8f9
Commit
619ca8f9
authored
Sep 20, 2019
by
Tim Scheiber
Browse files
Turrets now turn
parent
1c0f88a5
Pipeline
#3312
failed with stage
in 5 minutes and 1 second
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
assets/game_assets/blueprints/bullet.json
View file @
619ca8f9
...
...
@@ -19,7 +19,8 @@
},
"Fragile"
:
{},
"ContinuousPath"
:
{
"direction"
:
270
,
"curvature"
:
0
},
"Rigid_body"
:
{
"radius"
:
0.1
}
}
src/gameplay/shooting_comp.cpp
View file @
619ca8f9
...
...
@@ -18,4 +18,6 @@ namespace phase_shifter::gameplay {
rotation
+=
2
*
rotation_per_step
;
}
}
void
Shooting_comp
::
set_patterns
(
std
::
vector
<
Bulletpattern
>
patterns
)
{
this
->
patterns
=
patterns
;
}
}
\ No newline at end of file
src/gameplay/shooting_comp.hpp
View file @
619ca8f9
...
...
@@ -28,6 +28,7 @@ namespace phase_shifter::gameplay {
Bulletpattern
next_pattern
();
void
do_rotation
();
void
set_patterns
(
std
::
vector
<
Bulletpattern
>
patterns
);
float
default_orientation
=
0
;
// default orientation of "forward" in degrees with 0° beeing North (-Z)
float
rotation_per_step
=
0
;
// rotation the turret does per beat in degrees during idle state
...
...
src/meta_system.cpp
View file @
619ca8f9
...
...
@@ -95,7 +95,7 @@ namespace phase_shifter {
.
post_create
([
=
](
auto
entity
)
{
entity
.
process
([
&
](
gameplay
::
Fixed_path_comp
&
fixed_path
)
{
fixed_path
.
update_path
({
180
});
});
entity
.
process
([
&
](
gameplay
::
Shooting_comp
&
shooting
)
{
shooting
.
patterns
.
push_back
(
gameplay
::
Bulletpattern
({{
0
,
5
}}));
shooting
.
set_
patterns
(
{
gameplay
::
Bulletpattern
({{
0
,
0
}})
}
);
});
})
.
create
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment