using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class playercomponent : MonoBehaviour
{
public float speed;
public float JumpForce;
private float muveInput;
private Rigidbody2D rb;
private void Start()
{
rb = GetComponent<Rigidbody2D>();
}
private void FixeUpdate()
{
muveInput = muveInput.GetAxis("Horizoontal");
rb.velocity = new Vector2(muveInput * speed, rb.velocity.y);
}
}
Assets\script\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?)
Совсем новичок просто)
private float muveInput; // это таки float, цифирь с плавающей точкой
/*
------
*/
muveInput = muveInput.GetAxis("Horizoontal"); // и никакого GetAxis у него нет.
private float muveInputHAxis;
muveInputHAxis = muveInput.GetAxis("Horizoontal");