Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void OnCollisionEnter2D(Collision2D collision)
- {
- if (collision.gameObject.layer == 8){
- grounded = true;
- }
- }
- private void OnCollisionExit2D(Collision2D collision)
- {
- if (collision.gameObject.layer == 8)
- {
- grounded = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement