Merge remote-tracking branch 'origin/master'
# Conflicts: # src/gameplay/match/match.java
This commit is contained in:
commit
6028c8e965
2
pom.xml
2
pom.xml
@ -34,7 +34,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
|
|
||||||
<lwjgl.version>3.2.3</lwjgl.version>
|
<lwjgl.version>3.2.3</lwjgl.version>
|
||||||
<lwjgl.natives>natives-linux</lwjgl.natives>
|
<lwjgl.natives>natives-windows</lwjgl.natives>
|
||||||
<javafx.version>11</javafx.version>
|
<javafx.version>11</javafx.version>
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -35,7 +35,7 @@ public class BlueBaseFrames {
|
|||||||
pthb.add(bStandPTHB1);
|
pthb.add(bStandPTHB1);
|
||||||
Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
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);
|
bStandPB1,true,true,true,true,true);
|
||||||
blueStandframe1.setSpriteWrap(112,0,112,120);
|
blueStandframe1.setSpriteWrap(0,0,112,120);
|
||||||
return blueStandframe1;
|
return blueStandframe1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,8 +40,13 @@ public class nextFrameBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void goToNext() {
|
public void goToNext() {
|
||||||
|
try {
|
||||||
this.current = this.next.current;
|
this.current = this.next.current;
|
||||||
this.next = this.next.next;
|
this.next = this.next.next;
|
||||||
|
} catch (NullPointerException n) {
|
||||||
|
this.setCurrentFrame(null);
|
||||||
|
this.setNext(new nextFrameBuffer());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Frame getCurrentFrame() {
|
public Frame getCurrentFrame() {
|
||||||
|
@ -112,7 +112,7 @@ public class InputBuffer {
|
|||||||
} catch (ArrayIndexOutOfBoundsException e ) {
|
} catch (ArrayIndexOutOfBoundsException e ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for(int i = command.length - 2; i <= 0 && ret; i--) {
|
for(int i = command.length - 2; i >= 0 && ret; i--) {
|
||||||
backCounter = 1;
|
backCounter = 1;
|
||||||
if(startFrameCount - backCounter < 0) {frameToCheck = this.size - (backCounter - startFrameCount);}
|
if(startFrameCount - backCounter < 0) {frameToCheck = this.size - (backCounter - startFrameCount);}
|
||||||
else {frameToCheck = startFrameCount - backCounter;}
|
else {frameToCheck = startFrameCount - backCounter;}
|
||||||
@ -122,7 +122,7 @@ public class InputBuffer {
|
|||||||
ret = true;
|
ret = true;
|
||||||
search = false;
|
search = false;
|
||||||
} else {
|
} else {
|
||||||
if(backCounter == pastFramesToCheck) {
|
if(backCounter >= pastFramesToCheck) {
|
||||||
ret = false;
|
ret = false;
|
||||||
search = false;
|
search = false;
|
||||||
}
|
}
|
||||||
@ -132,8 +132,9 @@ public class InputBuffer {
|
|||||||
else {frameToCheck = startFrameCount - backCounter;}
|
else {frameToCheck = startFrameCount - backCounter;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startFrameCount = frameToCheck;
|
|
||||||
}
|
}
|
||||||
|
startFrameCount = frameToCheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -41,7 +41,7 @@ public class match {
|
|||||||
/**
|
/**
|
||||||
* the level of the "ground", used to determine if a character is in the air or not.
|
* 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 int timer;
|
||||||
private static InputBuffer inputsP1, inputsP2;
|
private static InputBuffer inputsP1, inputsP2;
|
||||||
@ -70,9 +70,9 @@ public class match {
|
|||||||
inputsP1 = new InputBuffer(inputBufferSize);
|
inputsP1 = new InputBuffer(inputBufferSize);
|
||||||
inputsP2 = new InputBuffer(inputBufferSize);
|
inputsP2 = new InputBuffer(inputBufferSize);
|
||||||
p1.setPos(-750, groundLevel); //TODO : change to better values if needed
|
p1.setPos(-750, groundLevel); //TODO : change to better values if needed
|
||||||
p2.setPos((int) (750 - objP2.getWidth() * objP2.getScalingFactor()), 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(p1.getPosX(),p1.getPosY(),0));
|
||||||
objP2.translate(new Vector3f(p2.getPosX(),p2.getPosY(),0));
|
objP1.translate(new Vector3f(p2.getPosX(),p2.getPosY(),0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -178,10 +178,10 @@ public class match {
|
|||||||
engine.add_objectGl(objP2);
|
engine.add_objectGl(objP2);
|
||||||
|
|
||||||
f = p1.getCurrentframe();
|
f = p1.getCurrentframe();
|
||||||
objP1.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3], ObjectGl.DEFAULT);
|
objP1.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3], ObjectGl.STICK_TOP);
|
||||||
|
|
||||||
f = p2.getCurrentframe();
|
f = p2.getCurrentframe();
|
||||||
objP2.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3], ObjectGl.DEFAULT);
|
objP2.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3], ObjectGl.STICK_TOP);
|
||||||
objP2.flipTextureWrapH();
|
objP2.flipTextureWrapH();
|
||||||
|
|
||||||
if (Joystick1Present) {
|
if (Joystick1Present) {
|
||||||
@ -197,7 +197,7 @@ public class match {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void ac(int i) {
|
private static void ac(int i) {
|
||||||
// System.out.println(i);
|
System.out.println(i);
|
||||||
switch (i) {
|
switch (i) {
|
||||||
|
|
||||||
//initiate a round
|
//initiate a round
|
||||||
@ -278,12 +278,11 @@ public class match {
|
|||||||
updatePos(p1);
|
updatePos(p1);
|
||||||
updatePos(p2);
|
updatePos(p2);
|
||||||
f = p1.getCurrentframe();
|
f = p1.getCurrentframe();
|
||||||
objP1.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3], ObjectGl.DEFAULT);
|
objP1.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3], ObjectGl.STICK_TOP);
|
||||||
objP1.translate(new Vector3f(p1.getPosX() - oldPosXp1,p1.getPosY() - oldPosYp1,0));
|
objP1.translate(new Vector3f(p1.getPosX()-oldPosXp1,p1.getPosY()-oldPosYp1,0));
|
||||||
f = p2.getCurrentframe();
|
f = p2.getCurrentframe();
|
||||||
objP2.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3], ObjectGl.DEFAULT);
|
objP2.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3], ObjectGl.STICK_TOP);
|
||||||
objP2.translate(new Vector3f(p2.getPosX() - oldPosXp2,p2.getPosY() - oldPosYp2,0));
|
objP2.translate(new Vector3f(p2.getPosX()-oldPosXp2,p2.getPosY()-oldPosYp2,0));
|
||||||
System.out.println(p1.getPosX());
|
|
||||||
|
|
||||||
boolean p1LooksRight = p1.getPosX() < p2.getPosX();
|
boolean p1LooksRight = p1.getPosX() < p2.getPosX();
|
||||||
if(p1LooksRight) {
|
if(p1LooksRight) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user