How this can be done as in this game?

The game line runner for android … the question is how it’s done for the game and make 3 different jumps pressures depending on how the screen … I’ve looked on youtube and forums etc … na na. but … only some Java script … and I want C #

using UnityEngine;
using System.Collections;

public class ControladorPersonaje : MonoBehaviour {
   
    public float fuerzaSalto = 100f;
    private bool corriendo = false;
    public float velocidad = 1f;
    private bool enSuelo = true;
    public Transform comprobadorSuelo;
    private float comprobadorRadio = 0.07f;
    public LayerMask mascaraSuelo;
   
    void FixedUpdate(){
        if(corriendo){
            rigidbody2D.velocity = new Vector2(velocidad, rigidbody2D.velocity.y);
        }

        enSuelo = Physics2D.OverlapCircle(comprobadorSuelo.position, comprobadorRadio, mascaraSuelo);

    }
   

    void Update () {
       
        if(Input.GetMouseButtonDown(0)){
            if(corriendo){
                // Hacemos que salte si puede saltar
                if(enSuelo){
                    rigidbody2D.velocity = new Vector2(rigidbody2D.velocity.x, fuerzaSalto);
                }
            }else{
                corriendo = true;
            }
        }
    }
}

Isnt this code in csharp?

it is indeed c#

Chasrp… please help me

So what is your problem? Please describe it so we can help. And stop those … its annoying.

i want know how with Input.GetMouseButtonDown or Input.GetMouseButton depends of time pressed do a different jumps

To be honest, timers are basic programming. If you do not know how to make a timer, you should do some more programming tutorials. There are good ones on YouTube.

but i dont know how merge the timer with the input

Dude you’re getting really annoying. You’ve created multiple posts about the same topic… You don’t understand programming at all; which is fine but it appears that you have no intention of spending the time to learn the basics. We’re not here to write your code for you, We’re here to help you write it yourself.

1 Like

let the timer count upwards while holding key after release the key multiply jumpheight or whatever with your counter
good luck