public boolean counter(int endTime, float tpf){
        if(time >=endTime){
            time = 0;
            return true;
        }
        else{
            time += tpf;
            return false;
        }
    }