im trying to make a platformer for ios but i cant get the int code to work for the buttons.
it just says
Assets/Scripts/Player.cs(10,14): error CS0501: 'Player.move(int)' must have a body because it is not marked abstract,extern, or partial
public GameObject menu; // Assign in inspector
private bool isShowing;
private bool isGrounded;
public Rigidbody2D rb;
public float movespeed;
public void move(int mDir);
void Update() {
if (Input.GetKeyDown("escape")) {
isShowing = !isShowing;
menu.SetActive(isShowing);
}
if (mDir == 1) {
rb.velocity = new Vector2(-movespeed, rb.velocity.y);
}
if (mDir == 2) {
rb.velocity = new Vector2(movespeed, rb.velocity.y);
}
if (mDir == 3 && isGrounded == true) {
rb.velocity = new Vector2(movespeed, rb.velocity.x);
}
}
↧