Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Sommersemester 2015
Cpp
Deth Buff Arr
Commits
f57f4bf8
Commit
f57f4bf8
authored
Sep 22, 2015
by
Elias Broschin
Browse files
quick fix
parent
a937181f
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/physics/collision/collision_component.h
View file @
f57f4bf8
...
...
@@ -17,7 +17,7 @@ namespace gdw{
collision_component
(
engine
&
engine
,
entity
&
owner
,
gdw
::
collision_shape
*
col_shape
);
~
collision_component
();
gdw
::
collision_shape
*
collision_shape
()
{
return
collision_shape_
;}
gdw
::
collision_shape
*
collision_shape
()
{
return
collision_shape_
.
get
()
;}
void
set_trigger
(
std
::
function
<
void
()
>
trigger
)
{
trigger_
=
trigger
;}
void
call_trigger
()
{
trigger_
();}
...
...
@@ -25,7 +25,7 @@ namespace gdw{
return
gdw
::
type_id
<
gdw
::
collision_component
>
();
}
private:
gdw
::
collision_shape
*
collision_shape_
;
std
::
unique_ptr
<
gdw
::
collision_shape
>
collision_shape_
;
std
::
function
<
void
()
>
trigger_
;
};
}
...
...
src/physics/collision/collision_component.cpp
View file @
f57f4bf8
...
...
@@ -10,7 +10,7 @@ namespace gdw{
collision_component
::
collision_component
(
engine
&
engine
,
entity
&
owner
,
gdw
::
collision_shape
*
col_shape
)
:
component
(
engine
,
owner
)
{
engine_
.
physics_system
().
register_collision_component
(
this
);
collision_shape_
=
col_shape
;
collision_shape_
=
std
::
move
(
std
::
unique_ptr
<
gdw
::
collision_shape
>
(
col_shape
))
;
collision_shape_
->
set_owner
(
&
owner
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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