вот мой код:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
public float speed;
public float jumpForce;
private float moveImput;
private Rigidbody2D rb;
private void Start()
{
rb = GetComponent<Rigidbody2D>();
}
private void FixetUbdate()
{
moveImput = moveImput.GetAxis("Horizontal");
rb.velocity = new Vector2(moveImput * speed, rb.velocity.y);
}
}
вот ошибка:
Assets\PlayerController.cs(20,31): error CS1061: 'float' does not contain a definition for 'GetAxis' and no accessible extension method 'GetAxis' accepting a first argument of type 'float' could be found (are you missing a using directive or an assembly reference?)