Main Gameplay Loop done.

Only Missing Throws and Projectile handling.
Need to be fused with engine.
This commit is contained in:
Azra Victor
2021-06-09 13:14:17 +02:00
committed by no
parent 1ec5cddf3d
commit ed2f49ad0e
9 changed files with 324 additions and 11 deletions

View File

@ -138,5 +138,15 @@ public class InputBuffer {
return ret;
}
/**
* Resets the inputbuffer. Clears every recorded input and puts the position back to 0.
*/
public void clear(){
for(int i = 0; i < this.size; i++) {
this.inputList[i].clear();
}
this.pos = 0;
}
}

View File

@ -83,5 +83,14 @@ public class Inputs {
}
return s;
}
/**
* Clears the input (puts them all to false)
*/
public void clear(){
for(int i = 0; i < numberOfInputs; i++) {
this.tab[i] = false;
}
}
}