using UnityEngine;
using System.Collections;
public class PlayerScript : MonoBehaviour {
Animator anim;
int jumpHash = Animator.StringToHash(“Jump”);
// Use this for initialization
void Start () {
animation = GetComponent ();
}
// Update is called once per frame
void Update () {
float move = Input.GetAxis ("Vertical");
anim.SetFloat ("Speed", move);
if (Input.GetKeyDown ("Space"))
{
anim.SetTrigger (jumpHash);
}
}
}
Its Supossed to be a script for my 2d character for animations.