Код: Выделить всё
public bool control;
forzaSalto = 300;
Rigidbody2D player;
float? asseY;
public bool saltando;
void Awake()
{
player = GetComponent();
player.Sleep();
}
private void FixedUpdate()
{
if ((verticale != 0 || orizzontale != 0) && !accovacciato)
{
Vector3 movimento = new Vector3(orizzontale * velocita, verticale * velocita, 0.0f);
transform.position = transform.position + movimento * Time.deltaTime;
}
Gira(orizzontale);
if (transform.position.y
Подробнее здесь: [url]https://stackoverflow.com/questions/78171156/having-problems-with-unity-spacebar-input-dont-work[/url]
Мобильная версия