small changes in match
This commit is contained in:
parent
fba6c50de0
commit
0939c047ad
@ -35,7 +35,7 @@ public class BlueBaseFrames {
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(112,0,112,120);
|
||||
blueStandframe1.setSpriteWrap(0,0,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class match {
|
||||
/**
|
||||
* the level of the "ground", used to determine if a character is in the air or not.
|
||||
*/
|
||||
private static final int groundLevel = 200;
|
||||
private static final int groundLevel = 1700;
|
||||
|
||||
private static int timer;
|
||||
private static InputBuffer inputsP1, inputsP2;
|
||||
@ -69,10 +69,10 @@ public class match {
|
||||
timer = 99;
|
||||
inputsP1 = new InputBuffer(inputBufferSize);
|
||||
inputsP2 = new InputBuffer(inputBufferSize);
|
||||
p1.setPos(-750, groundLevel); //TODO : change to better values if needed
|
||||
p2.setPos(-750, groundLevel); //TODO : change to better values if needed
|
||||
objP1.translate(new Vector3f(p1.getPosX(),p1.getPosY(),0));
|
||||
objP1.translate(new Vector3f(p2.getPosX(),p2.getPosY(),0));
|
||||
p1.setPos(-2222250, groundLevel); //TODO : change to better values if needed
|
||||
p2.setPos(222250, groundLevel); //TODO : change to better values if needed
|
||||
objP1.translate(new Vector3f((float)p1.getPosX(),(float)p1.getPosY(),1f));
|
||||
objP1.translate(new Vector3f((float)p2.getPosX(),(float)p2.getPosY(),2f));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -242,9 +242,11 @@ public class match {
|
||||
|
||||
//read both players inputs
|
||||
case 20:
|
||||
if (glfwJoystickPresent(GLFW_JOYSTICK_1) && glfwJoystickPresent(GLFW_JOYSTICK_2)) {
|
||||
if (glfwJoystickPresent(GLFW_JOYSTICK_1)) {
|
||||
gamepad1.inputRefresh();
|
||||
inputsP1.recordInputsFromGamepad(gamepad1, p1.getPosX() < p2.getPosX());
|
||||
}
|
||||
if(glfwJoystickPresent(GLFW_JOYSTICK_2)) {
|
||||
gamepad2.inputRefresh();
|
||||
inputsP2.recordInputsFromGamepad(gamepad2, p2.getPosX() <= p1.getPosX());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user