Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. void OnTriggerStay2D(Collider2D other){
  2. if (other.gameObject.CompareTag("platform")) {
  3. if (Platform.platform == false){
  4. MyRigidBody.AddForce (transform.right * -50);
  5. }
  6. if (Platform.platform == true){
  7. MyRigidBody.AddForce (transform.right * 50);
  8. }
  9.  
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement