Почему персонаж не прыгает?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Hero : MonoBehaviour
{
Rigidbody2D rb;
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
private void Update()
{
}
if(Input.GetKeyDown(KeyCode.Space)) {
vino();
private void FixedUpdate() => rb.velocity = new Vector2(Input.GetAxis("Horizontal") * 12f, rb.velocity.y);
}
void vino(){
rb.AddForce(transform.up * 14f, ForceMode2D.Impulse);
{
{