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
Wintersemester 2018-2019
Unity
Suck It
Commits
201baaaa
Commit
201baaaa
authored
Mar 30, 2019
by
Sebastian
Browse files
fixed warning with velocity of static Rigidbody2D
parent
2ae7e55c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Assets/_Game/Scripts/Level Hazards/SliderObject.cs
View file @
201baaaa
...
...
@@ -17,7 +17,7 @@ namespace _Game.Scripts.Level_Hazards
if
(
other
.
gameObject
.
layer
==
LayerMask
.
NameToLayer
(
"Player"
)
||
other
.
gameObject
.
layer
==
LayerMask
.
NameToLayer
(
"Enemy"
)
||
other
.
gameObject
.
CompareTag
(
"Fire"
))
{
_rigidbody2D
.
velocity
=
Vector2
.
zero
;
//
_rigidbody2D.velocity = Vector2.zero;
_rigidbody2D
.
bodyType
=
RigidbodyType2D
.
Static
;
}
}
...
...
@@ -28,7 +28,7 @@ namespace _Game.Scripts.Level_Hazards
other
.
gameObject
.
CompareTag
(
"Fire"
))
{
_rigidbody2D
.
bodyType
=
RigidbodyType2D
.
Dynamic
;
_rigidbody2D
.
velocity
=
Vector2
.
zero
;
//
_rigidbody2D.velocity = Vector2.zero;
}
}
}
...
...
Write
Preview
Markdown
is supported
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