Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using UnityEngine;
- public class playercontroller : MonoBehaviour {
- //Declarations de variables
- public int speed = 7, jump = 300;
- public bool isGrounded = false;
- private bool isJumpring = false;
- private Animator Anim;
- void Start () {
- Anim = GetComponent<Animator> ();
- }
- void Update () {
- float h = Input.GetAxis("Horizontal")
- transform.Translate (Vector2.right * h * speed * Time.deltaTime);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement