아주 간단한 네모로 이동할수있는 게임임, 물리법칙도 적용시킴





using System.Collections;

using System.Collections.Generic;

using UnityEngine;


public class movemnet2 : MonoBehaviour

{


    public float movemnetspeed = 1f;

    public float jumpforce = 1;


    public int jumpstime = 2;


    private Rigidbody2D _rigidbody2D;


    void Start()

    {

        _rigidbody2D = GetComponent<Rigidbody2D>(); //점프

    }


    private void Update()

    {

        var movement = Input.GetAxis("Horizontal");

        transform.remove_style_tag;">public int jumpstime = 2;


에서 한번 점프할때마다 1개씩 줄고

땅에 닿으면 다시 2로 리셋되는걸 만들고싶은데 어디를 수정해야지 될까