up
This commit is contained in:
1 parent
ae660adb4a
commit
0c24eff46b
33 files changed
+26
-13
No files matched your search
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.
+1
-1
@@ -28,4 +28,4 @@ x......xx....xx....xx......x
|
||||
x.xxxxxxxxxx.xx.xxxxxxxxxx.x
|
||||
x.xxxxxxxxxx.xx.xxxxxxxxxx.x
|
||||
x..........................x
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
+13
-2
@@ -7,6 +7,11 @@ x..........................x
|
||||
x.xxxx.xx.xxxxxxxx.xx.xxxx.x
|
||||
x.xxxx.xx.xxxxxxxx.xx.xxxx.x
|
||||
x......xx....xx....xx......x
|
||||
x......xx....x x..........x
|
||||
x.xxxx.xxxxx.x x xxxxx.xx.x
|
||||
x.x x.x x.x x.x x.xx.x
|
||||
x.xxxx.xxxxx.xxxx.xxxxx.xx.x
|
||||
x......xx..........xx......x
|
||||
xxxxxx.xxxxx0xx0xxxxx.xxxxxx
|
||||
x.xxxxx0xx0xxxxx.x
|
||||
x.xx0000000000xx.x
|
||||
@@ -17,7 +22,13 @@ xxxxxx.xx0x000000x0xx.xxxxxx
|
||||
x.xx0xxxxxxxx0xx.x
|
||||
x.xx0000000000xx.x
|
||||
x.xx0xxxxxxxx0xx.x
|
||||
xxxxxx.xx0xxxxxxxx0xx.xxxxxx
|
||||
xxxxxx.xx0xxxx xx0xx.xxxxxx
|
||||
x......xx....x x..........x
|
||||
x.xxxx.xxxxx.x x xxxxx.xx.x
|
||||
x.x x.x x.x x.x x.xx.x
|
||||
x.xxxx.xxxxx.xxxx.xxxxx.xx.x
|
||||
x......xx..........xx......x
|
||||
xxxxxx.xx.xxxxxxxx.xx.xxxxxx
|
||||
x............xx............x
|
||||
x.xxxx.xxxxx.xx.xxxxx.xxxx.x
|
||||
x.xxxx.xxxxx.xx.xxxxx.xxxx.x
|
||||
@@ -28,4 +39,4 @@ x......xx....xx....xx......x
|
||||
x.xxxxxxxxxx.xx.xxxxxxxxxx.x
|
||||
x.xxxxxxxxxx.xx.xxxxxxxxxx.x
|
||||
x..........................x
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
@@ -52,7 +52,7 @@ public class GameLogic extends SurfaceView implements SurfaceHolder.Callback {
|
||||
private Vibrator v;
|
||||
|
||||
static int BOARD_TILE_SIZE=17;
|
||||
static int BOARD_HEIGHT = 42;
|
||||
static int BOARD_HEIGHT = 31;
|
||||
static int BOARD_WIDTH = 28;
|
||||
static int GHOST_EAT_POINT = 200;
|
||||
static int FOODUP_POINT = 150;
|
||||
@@ -106,6 +106,7 @@ public class GameLogic extends SurfaceView implements SurfaceHolder.Callback {
|
||||
SoundStuff.sp.stop(ID);
|
||||
eatInRow = 0;
|
||||
first = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -243,7 +244,7 @@ public class GameLogic extends SurfaceView implements SurfaceHolder.Callback {
|
||||
path = boardGame.getPath();
|
||||
food = boardGame.getbGame();
|
||||
pacman = new PacMan(getResources(), new Vect((BOARD_TILE_SIZE
|
||||
* BOARD_WIDTH / 2), BOARD_TILE_SIZE * 34), getContext(),
|
||||
* BOARD_WIDTH / 2), BOARD_TILE_SIZE * 23), getContext(),
|
||||
boardGame.getBlock(), BOARD_TILE_SIZE, 100f);
|
||||
ghosts = new LinkedList<Ghost>();
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Ghost extends GameObject {
|
||||
private int farame = 0;
|
||||
private int framecount = 0;
|
||||
private float frameTicker;
|
||||
private int framePeriod = 500;
|
||||
private float framePeriod = 0.5f;
|
||||
private boolean swap;
|
||||
|
||||
private double time; // do mrugania;
|
||||
@@ -134,9 +134,10 @@ public class Ghost extends GameObject {
|
||||
|
||||
}
|
||||
} else if (eatable && blinking) {
|
||||
after += gameTime - before;
|
||||
if (gameTime > frameTicker + framePeriod) {
|
||||
frameTicker = gameTime;
|
||||
frameTicker+= gameTime;
|
||||
time+=gameTime;
|
||||
if (frameTicker > framePeriod) {
|
||||
frameTicker = 0;
|
||||
// increment the frame
|
||||
if (!swap)
|
||||
currentFrame++;
|
||||
@@ -144,14 +145,14 @@ public class Ghost extends GameObject {
|
||||
currentFrame--;
|
||||
if (currentFrame == 0 || currentFrame == 1) {
|
||||
swap = !swap;
|
||||
if (after > 1000) {
|
||||
after = 0;
|
||||
framePeriod -= 80;
|
||||
if (time > 1) {
|
||||
time = 0;
|
||||
framePeriod -= 0.08;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
before = gameTime;
|
||||
|
||||
}
|
||||
// define the rectangle to cut out sprite
|
||||
sourceEatRect.left = currentFrame * spriteEatWidth;
|
||||
|
||||
Reference in new issue
Block a user