Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. if (platformRB2d.velocity.y <= 0)
  2. {
  3. gameObject.GetComponent<BoxCollider2D>().enabled = false;
  4. }
  5. }
  6.  
  7. private void OnCollisionExit2D(Collision2D collider)
  8. {
  9. if (collider.gameObject.tag == "platformManager")
  10. {
  11. Debug.Log("!!!!!!!!!");
  12. gameObject.GetComponent<BoxCollider2D>().enabled = true;
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement