Левша, isGrounded не работает. а по другому там никак. вот как делаю
Код
using UnityEngine;
public class PlayerController : MonoBehaviour {
void Update(){
transform.Translate(Input.GetAxis("Horizontal"),0,0);
if (Input.GetKeyDown("space")){
if (isGrounded()){
rigidbody.AddForce (0, 300, 0);}
}
}
}
ошибка
Assets/PlayerController.cs(9,29): error CS0103: The name `isGrounded' does not exist in the current context