Fix of jump arcs hopefully
This commit is contained in:
parent
2d54c76bc6
commit
23bc9aabcd
@ -1022,7 +1022,7 @@ public class BlueBaseFrames {
|
|||||||
String path = "textures/Sprite_sans_grille_9comp.png";
|
String path = "textures/Sprite_sans_grille_9comp.png";
|
||||||
String pathToBG = "textures/arena1.png";
|
String pathToBG = "textures/arena1.png";
|
||||||
|
|
||||||
Frame f = BlueNormals.ForwardDFrame0();
|
Frame f = BlueNormals.crouchCFrame2();
|
||||||
|
|
||||||
|
|
||||||
ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null);
|
ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null);
|
||||||
|
@ -232,15 +232,10 @@ public class Frame {
|
|||||||
* @param f the frame to clone
|
* @param f the frame to clone
|
||||||
*/
|
*/
|
||||||
public void cloneWithoutMovement(Frame f) {
|
public void cloneWithoutMovement(Frame f) {
|
||||||
this.cloneArray(f); //Il faut cloner individuellement chaque hitbox des differentes listes pour ne pas garder les pointeurs
|
double moveX = this.move_x;
|
||||||
Push_HitBox phb = f.getPushHitBox();
|
double moveY = this.move_y;
|
||||||
this.setPushHitBox(new Push_HitBox(phb.getPosX(), phb.getPosY(), phb.getSize_x(), phb.getSize_y()));
|
this.clone(f);
|
||||||
this.normalCancellable = f.isNormalCancellable();
|
this.setMove_x(moveX);
|
||||||
this.specialCancellable = f.isSpecialCancellable();
|
this.setMove_y(moveY);
|
||||||
this.jumpCancellable = f.jumpCancellable;
|
|
||||||
this.moveCancellable = f.isMoveCancellable();
|
|
||||||
this.isDashCancellable = f.isDashCancellable;
|
|
||||||
this.lastFrameOfHit = f.islastFrameOfHit();
|
|
||||||
this.setSpriteWrap(f.sprite[0], f.sprite[1], f.sprite[2], f.sprite[3]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,14 +88,14 @@ public class nextFrameBuffer {
|
|||||||
nextFrameBuffer fb = new nextFrameBuffer();
|
nextFrameBuffer fb = new nextFrameBuffer();
|
||||||
fb.clone(this);
|
fb.clone(this);
|
||||||
this.emptyQueue();
|
this.emptyQueue();
|
||||||
try{fb.goToNext();} catch(IndexOutOfBoundsException e) {goOn = false;}
|
try{fb.goToNext();} catch(NullPointerException e) {goOn = false;}
|
||||||
while(goOn && i < f.size()) {
|
while(goOn && i < f.size()) {
|
||||||
try{
|
try{
|
||||||
fb.current.cloneWithoutMovement(f.get(i));
|
fb.current.cloneWithoutMovement(f.get(i));
|
||||||
this.addFrameToQueue(fb.current);
|
this.addFrameToQueue(fb.current);
|
||||||
fb.goToNext();
|
fb.goToNext();
|
||||||
i++;
|
i++;
|
||||||
} catch(IndexOutOfBoundsException e) { goOn = false;}
|
} catch(NullPointerException e) { goOn = false;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user