Hi guys,I am following this tutorial on youtube and i followed i think he typed but got a few errors i dont understand.
Assets/Scripts/Network/NetworkAnimsStates.cs(6,22): error CS1519: Unexpected symbol `public’ in class, struct, or interface member declaration
Assets/Scripts/Network/NetworkAnimsStates.cs(20,75): error CS1031: Type expected
Assets/Scripts/Network/NetworkAnimsStates.cs(20,86): error CS1525: Unexpected symbol ;', expecting
)‘, .',
::’, ?',
[', <', or
’
I dont know why i am getting this errors but here’s my script
using UnityEngine;
using System.Collections;
public class NetworkAnimsStates : MonoBehaviour {
public Animations CurrentAnim = Animations.idle
public GameObject ThirdPersonPlayer;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
ThirdPersonPlayer.animation.CrossFade (Enum.GetName (typeof(Animation), CurrentAnim));
}
public void SyncAnimation(string AnimName)
{
CurrentAnim = (Animations)Enum.Parse(typeof(AnimationState, AnimName);
}
}
public enum Animations
{
idle,
walk,
run,
jump_pose
}