Guest User

Untitled

a guest
Dec 17th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. If (Input.GetKey(KeyCode.Right) == true) {
  2. player.moveRight;
  3. }
  4.  
  5. void Player::moveRight() {
  6. animator.SetBool("MoveRight", true);
  7. GameObject.move(Vector3.right);
  8. _facing = RIGHT;
  9. }
  10.  
  11. void OnCollisionEnter2D (Collision2D coll) {
  12. string tag = coll.collider.gameObject.tag;
  13. if (tag == "box1") {
  14. player.moveRight;
  15. }
  16. }
Add Comment
Please, Sign In to add comment