Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnTriggerStay2D(Collider2D other){
- if (other.gameObject.CompareTag("platform")) {
- if (Platform.platform == false){
- MyRigidBody.AddForce (transform.right * -50);
- }
- if (Platform.platform == true){
- MyRigidBody.AddForce (transform.right * 50);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement