I have an problem with my script. This script is very important! Sorry for my English I come from Germany
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour {
public int WalkSpeed;
public int RunSpeed;
public GameObject WalkAnimationHolder;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void FixedUpdate () {
AnimationController ();
}
void AnimationController (){
if(Input.GetAxis ("Horizontal") !=0 || Input.GetAxis ("Vertical") !=0){
if(Input.GetKey (KeyCode.LeftShift) && Input.GetKey (KeyCode.W)){
WalkAnimationHolder.animation.CrossFade("M4_Run_final");
}
else{
WalkAnimationHolder.animation.CrossFade("M4_walk_Final");
}
}
else{
WalkAnimationHolder.animation.CrossFade("M4_Idle")
}
}
}