unity 3d c# disable double jump code example
Example: remove double jump unity
using UnityEngine; using System.Collections; public class Move : MonoBehaviour { // Use this for initialization void Start () { ; } // Update is called once per frame void Update () { rigidbody2D.AddForce (Vector2.right * 10); } public void Groundand(Collider2D coll){ if (coll.gameObject.name == "ground") { rigidbody2D.velocity = transform.up * 10; } } }