heres my code for movement but theres an error. error CS1519: Invalid token ‘void’ in class, record, struct, or interface member declaration. i have no idea what i did wrong can someone help me? this is also done using c#.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player1 : MonoBehaviour
{
public float moveSpeed;
public Rigidbody2D rb;
private Vector2 moveDirection;
// Update is called once per frame
void Update()
{
processInputs();
}
void ///
/// This function is called every fixed framerate frame, if the monobehaviour is enable
///
void fixedUpdate()
{
// phsics calculations
Move();
}
moveDirection = new Vector2(MoveX, moveY); // TO DO COME BACK TO THIS
}
void Move()
{
rb.velocity = new Vector2(moveDirection.x * movespeed, moveDirection.y * moveSpeed);
}
}