Animation Scripting Issue,Walking Animation Script Not Working
Hey Guys, I don't Have any experience in c# so I copied a script.I had some errors: 1.Assets/scripts/scripts/Narutoanimcont.cs(8,11): error CS1519: Unexpected symbol public' in class, struct, or interface member declaration 2.Assets/scripts/scripts/Narutoanimcont.cs(30,36): error CS1525: Unexpected symbol
;', expecting )' or
,' 3.Assets/scripts/scripts/Narutoanimcont.cs(30,37): warning CS0642: Possible mistaken empty statement 4.Assets/scripts/scripts/Narutoanimcont.cs(31,9): error CS1525: Unexpected symbol )', expecting
)' or ,' 5.Assets/scripts/scripts/Narutoanimcont.cs(32,33): error CS1525: Unexpected symbol
;', expecting )' or
,' The Script Is The Following: using System.Collections; using System.Collections.Generic; using UnityEngine;
public class Naruto : MonoBehaviour {
static animator anim
public float speed = 5.0f;
public float rotationSpeed = 75.0f;
// Use this for initialization
void Start () {
anim=GetComponent<Animator> ();
}
// Update is called once per frame
void Update () {
float translation = Input.GetAxis("Vertical")*speed;
float rotation = Input.GetAxis("Horizontal")*rotationSpeed;
translation *= Time.deltaTime;
rotation *= Time.deltaTime;
transform.Translate (0,0,translation);
transform.Rotate (0,rotation,0);
if(translation != 0)(
anim.SetBool("IsWalking", true);
) else (
anim.SetBool("IsWalking", false);
}
}
Please Can You Solve The Problem! I really Want To finish That Game, but errors won't allow me :-( crying
Your answer
Follow this Question
Related Questions
I can't make transition from actual animation to previous one 1 Answer
Rolling Animation Problem 0 Answers
Unexpected Symbol? Socorro! 1 Answer
Game doesn't work 1 Answer
Exporting Maya Animation of player with ball to unity ? 0 Answers