Clean sh does not wipe your classes

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
unknown 2022-06-11 11:24:47 +03:00
parent 0fc9aee919
commit e1aa57b7f1
44 changed files with 42 additions and 15 deletions

View File

@ -6,4 +6,4 @@ printf "\n\n\nRunning Program...\n\n"
ORIGINAL_LOC=$(pwd)
cd $OUT_DIR
java ${CUSTOM_PARAMS} -cp .:../lib/bin/ -Djava.library.path="${LIBRARY_PATH}" ${MAIN_CLASS} "$@"
#${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh
${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh

View File

@ -6,4 +6,4 @@ printf "\n\n\nRunning Program...\n\n"
ORIGINAL_LOC=$(pwd)
cd $OUT_DIR
java ${CUSTOM_PARAMS} -cp ".;../lib/bin/ " "-Djava.library.path=${LIBRARY_PATH}" ${MAIN_CLASS} "$@"
#${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh
${ORIGINAL_LOC}/${LANGUAGE}/scripts/clean.sh

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
Main-Class: sig.RabiClone

Binary file not shown.

View File

@ -375,8 +375,7 @@ public class Player extends AnimatedObject{
if(checked_tile_top_right.getCollision()==CollisionType.BLOCK||checked_tile_top_left.getCollision()==CollisionType.BLOCK){
//System.out.println(checked_tile_top_right.getCollision()+"//"+checked_tile_top_left.getCollision());
if(checked_tile_bottom_center.getCollision()==CollisionType.SLOPE){
}else{
} else {
if (checked_tile_top_right.getCollision()==CollisionType.BLOCK) {
setX(((int)(getX()-getAnimatedSpr().getWidth()/2)/Tile.TILE_WIDTH)*Tile.TILE_WIDTH+Tile.TILE_WIDTH/2+3+check_distance_x);
} else {
@ -399,7 +398,7 @@ public class Player extends AnimatedObject{
groundCollision=false;
} else {
if(checked_tile_bottom_center.getCollision()==CollisionType.SLOPE){
setY(-(getX()%Tile.TILE_WIDTH)+(int)(getY()+getAnimatedSpr().getHeight()/2)/Tile.TILE_HEIGHT*Tile.TILE_HEIGHT+(getAnimatedSpr().getHeight()/2-4));
moveUpSlope(checked_tile_bottom_center);
}
groundCollision=true;
jumpCount=maxJumpCount;
@ -414,9 +413,9 @@ public class Player extends AnimatedObject{
Tile checked_tile_bottom_left = RabiClone.CURRENT_MAP.getTile((int)(getX()-getAnimatedSpr().getWidth()/2+4)/Tile.TILE_WIDTH, (int)(getY()+getAnimatedSpr().getHeight()/2+check_distance_y)/Tile.TILE_HEIGHT);
Tile checked_tile_bottom_center = RabiClone.CURRENT_MAP.getTile((int)(getX())/Tile.TILE_WIDTH, (int)(getY()+getAnimatedSpr().getHeight()/2)/Tile.TILE_HEIGHT);
if(checked_tile_bottom_center.getCollision()==CollisionType.SLOPE
&& getY()+check_distance_y>(-(getX()%Tile.TILE_WIDTH)+(int)(getY()+getAnimatedSpr().getHeight()/2)/Tile.TILE_HEIGHT*Tile.TILE_HEIGHT+(getAnimatedSpr().getHeight()/2-4)))
&& getY()+check_distance_y>ySlopeCollisionPoint(checked_tile_bottom_center))
{
setY(-(getX()%Tile.TILE_WIDTH)+(int)(getY()+getAnimatedSpr().getHeight()/2)/Tile.TILE_HEIGHT*Tile.TILE_HEIGHT+(getAnimatedSpr().getHeight()/2-4));
moveUpSlope(checked_tile_bottom_center);
collisionOccured = groundCollision(check_distance_y);
System.out.println(checked_tile_bottom_center);
break;
@ -450,6 +449,35 @@ public class Player extends AnimatedObject{
}
private double ySlopeCollisionPoint(Tile tile) {
switch(tile){
case BIG_SLOPE_LEFT1:
return 0;
case BIG_SLOPE_LEFT2:
return 0;
case BIG_SLOPE_RIGHT1:
return 0;
case BIG_SLOPE_RIGHT2:
return 0;
case SMALL_SLOPE_LEFT:
return -(getX()%Tile.TILE_WIDTH)+(int)(getY()+getAnimatedSpr().getHeight()/2)/Tile.TILE_HEIGHT*Tile.TILE_HEIGHT+(getAnimatedSpr().getHeight()/2-4);
case SMALL_SLOPE_RIGHT:
return Tile.TILE_WIDTH-(getX()%Tile.TILE_WIDTH)+(int)(getY()+getAnimatedSpr().getHeight()/2)/Tile.TILE_HEIGHT*Tile.TILE_HEIGHT+(getAnimatedSpr().getHeight()/2-4);
}
return 0;
}
private void moveUpSlope(Tile checked_tile_bottom_center) {
setY(ySlopeCollisionPoint(checked_tile_bottom_center));
}
private boolean groundCollision(double check_distance_y) {
boolean collisionOccured;
setY((getY()-check_distance_y));