Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If (Input.GetKey(KeyCode.Right) == true) {
- player.moveRight;
- }
- void Player::moveRight() {
- animator.SetBool("MoveRight", true);
- GameObject.move(Vector3.right);
- _facing = RIGHT;
- }
- void OnCollisionEnter2D (Collision2D coll) {
- string tag = coll.collider.gameObject.tag;
- if (tag == "box1") {
- player.moveRight;
- }
- }
Add Comment
Please, Sign In to add comment