Wpis z mikrobloga

#programowanie

void Update () {
float translation = Input.GetAxis("Vertical") * speed;
float sideway = Input.GetAxis("Horizontal") * speed;
translation *= Time.deltaTime;
sideway *= Time.deltaTime;
transform.Translate(sideway, 0, translation);
if (Input.GetKeyDown("escape"))
Cursor.lockState = CursorLockMode.None;
}

}

Owy kod wywala mi blad:
Assets/contoller.cs(19,0): error CS1525: Unexpected symbol `void'

Widzi ktos tutaj jakikolwiek blad?
  • 11
  • Odpowiedz
public class contoller : MonoBehaviour {
public float speed = 10.0F;

// Use this for initialization
void start ()

{
  • Odpowiedz