Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.1 kB
1
Indexable
Never
    public static void scegliTrial(){
        if( primolancio || Haptics.clicked || randN1 >=3 ){
            primolancio = false;
            while(trialValido == false){
            
                //vibrazioneLanciata = false;
                randN1 = Random.Range(0, 5);
                randN2 = Random.Range(0, 5);
            //Debug.Log("FUORI Array in pos: " + randN1 +" "+ randN2 + " ha "+ trialsQnt[randN1][randN2] + " elementi" );
                if(trialsQnt[randN1][randN2] != 0){
                    trialValido=true;
                    trialsQnt[randN1][randN2]--;
                    totaleTrials--;
                    stampaTipoTrial();
                    //Debug.Log("Array in pos: " + randN1 +" "+ randN2 + " ha "+ trialsQnt[randN1][randN2] + " elementi");
                    //Debug.Log("TOTALE TRIALS: " + totaleTrials);
                
                
                }
            
            }
        }
        settato = false;
        vibrazioneLanciata = false;
        trialValido=true;
        Haptics.clicked = false;

    }