Permalink
Browse files

Fix player errors

  • Loading branch information...
1 parent 456abc3 commit 166f356c0be37d595f7b750a517e7793416e5f9a @aardvarrk aardvarrk committed Jan 23, 2013
View
@@ -1,5 +1,5 @@
#BlueJ class context
comment0.params=
comment0.target=void\ act()
-comment0.text=\r\n\ Act\ -\ do\ whatever\ the\ Brick\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
+comment0.text=\n\ Act\ -\ do\ whatever\ the\ Brick\ wants\ to\ do.\ This\ method\ is\ called\ whenever\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\n
numComments=1
View
@@ -1,7 +1,7 @@
#BlueJ class context
comment0.params=
comment0.target=Coin()
-comment0.text=\r\n\ Act\ -\ do\ whatever\ the\ Coin\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
+comment0.text=\n\ Act\ -\ do\ whatever\ the\ Coin\ wants\ to\ do.\ This\ method\ is\ called\ whenever\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\n
comment1.params=
comment1.target=void\ act()
numComments=2
View
@@ -1,7 +1,7 @@
#BlueJ class context
comment0.params=
comment0.target=void\ act()
-comment0.text=\r\n\ Act\ -\ do\ whatever\ the\ Enemy\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
+comment0.text=\n\ Act\ -\ do\ whatever\ the\ Enemy\ wants\ to\ do.\ This\ method\ is\ called\ whenever\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\n
comment1.params=
comment1.target=int\ getPoints()
numComments=2
View
@@ -1,15 +1,15 @@
#BlueJ class context
comment0.params=
comment0.target=void\ act()
-comment0.text=\r\n\ Act\ -\ do\ whatever\ the\ menuBar\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
+comment0.text=\n\ Act\ -\ do\ whatever\ the\ menuBar\ wants\ to\ do.\ This\ method\ is\ called\ whenever\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\n
comment1.params=
comment1.target=GameOverScreen()
-comment1.text=\r\n\ Create\ a\ score\ board\ with\ dummy\ result\ for\ testing.\r\n
+comment1.text=\n\ Create\ a\ score\ board\ with\ dummy\ result\ for\ testing.\n
comment2.params=score\ coins\ total
comment2.target=GameOverScreen(int,\ int,\ int)
comment3.params=title\ prefix\ score
comment3.target=void\ makeScoreImage(java.lang.String,\ java.lang.String,\ int)
-comment3.text=\r\n\ Make\ the\ score\ board\ image.\r\n
+comment3.text=\n\ Make\ the\ score\ board\ image.\n
comment4.params=title\ prefix\ coins
comment4.target=void\ makeCoinImage(java.lang.String,\ java.lang.String,\ int)
comment5.params=title\ prefix\ total
View
@@ -1,5 +1,5 @@
#BlueJ class context
comment0.params=
comment0.target=void\ act()
-comment0.text=\r\n\ Act\ -\ do\ whatever\ the\ Ground\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
+comment0.text=\n\ Act\ -\ do\ whatever\ the\ Ground\ wants\ to\ do.\ This\ method\ is\ called\ whenever\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\n
numComments=1
View
Binary file not shown.
View
@@ -1,12 +1,12 @@
#BlueJ class context
comment0.params=leftT\ rightT
comment0.target=MovingBrickLeft(int,\ int)
-comment0.text=\r\n\ Move\ in\ the\ direction\ we\ are\ currently\ moving\ in.\ Turn\ if\ we\ reach\ a\ turning\ point.\r\n
+comment0.text=\n\ Move\ in\ the\ direction\ we\ are\ currently\ moving\ in.\ Turn\ if\ we\ reach\ a\ turning\ point.\n
comment1.params=
comment1.target=void\ act()
comment2.params=
comment2.target=boolean\ atTurningPoint()
-comment2.text=\r\n\ Test\ if\ we\ are\ at\ one\ of\ the\ turning\ points.\r\n
+comment2.text=\n\ Test\ if\ we\ are\ at\ one\ of\ the\ turning\ points.\n
comment3.params=
comment3.target=int\ getMovingBrickLeftSpeed()
numComments=4
View
@@ -1,12 +1,12 @@
#BlueJ class context
comment0.params=leftT\ rightT
comment0.target=MovingBrickRight(int,\ int)
-comment0.text=\r\n\ Move\ in\ the\ direction\ we\ are\ currently\ moving\ in.\ Turn\ if\ we\ reach\ a\ turning\ point.\r\n
+comment0.text=\n\ Move\ in\ the\ direction\ we\ are\ currently\ moving\ in.\ Turn\ if\ we\ reach\ a\ turning\ point.\n
comment1.params=
comment1.target=void\ act()
comment2.params=
comment2.target=boolean\ atTurningPoint()
-comment2.text=\r\n\ Test\ if\ we\ are\ at\ one\ of\ the\ turning\ points.\r\n
+comment2.text=\n\ Test\ if\ we\ are\ at\ one\ of\ the\ turning\ points.\n
comment3.params=
comment3.target=int\ getMovingBrickRightSpeed()
numComments=4
View
@@ -1,12 +1,12 @@
#BlueJ class context
comment0.params=topT\ bottomT
comment0.target=MovingBrickUp(int,\ int)
-comment0.text=\r\n\ Move\ in\ the\ direction\ we\ are\ currently\ moving\ in.\ Turn\ if\ we\ reach\ a\ turning\ point.\r\n
+comment0.text=\n\ Move\ in\ the\ direction\ we\ are\ currently\ moving\ in.\ Turn\ if\ we\ reach\ a\ turning\ point.\n
comment1.params=
comment1.target=void\ act()
comment2.params=
comment2.target=boolean\ atTurningPoint()
-comment2.text=\r\n\ Test\ if\ we\ are\ at\ one\ of\ the\ turning\ points.\r\n
+comment2.text=\n\ Test\ if\ we\ are\ at\ one\ of\ the\ turning\ points.\n
comment3.params=
comment3.target=int\ getMovingBrickUpSpeed()
numComments=4
View
Binary file not shown.
View
@@ -1,17 +1,17 @@
#BlueJ class context
comment0.params=file
comment0.target=void\ setImage(java.lang.String)
-comment0.text=\r\n\ Set\ the\ image\ of\ the\ actor.\ If\ the\ image\ is\ a\ normal\ picture,\ it\ will\ be\ displayed\ as\ normal.\r\n\ If\ it's\ an\ animated\ GIF\ file\ then\ it\ will\ be\ displayed\ as\ an\ animated\ actor.\r\n\ @overrides\ setImage\ in\ Actor.\r\n
+comment0.text=\n\ Set\ the\ image\ of\ the\ actor.\ If\ the\ image\ is\ a\ normal\ picture,\ it\ will\ be\ displayed\ as\ normal.\n\ If\ it's\ an\ animated\ GIF\ file\ then\ it\ will\ be\ displayed\ as\ an\ animated\ actor.\n\ @overrides\ setImage\ in\ Actor.\n
comment1.params=
comment1.target=java.util.List\ getImages()
-comment1.text=\r\n\ Get\ all\ the\ images\ used\ in\ the\ animation\r\n\ @return\ a\ list\ of\ GreenfootImages,\ corresponding\ to\ each\ frame.\r\n
+comment1.text=\n\ Get\ all\ the\ images\ used\ in\ the\ animation\n\ @return\ a\ list\ of\ GreenfootImages,\ corresponding\ to\ each\ frame.\n
comment2.params=
comment2.target=void\ act()
-comment2.text=\r\n\ Move\ onto\ the\ next\ frame\ if\ the\ time\ for\ the\ current\ frame\ has\ expired.\r\n
+comment2.text=\n\ Move\ onto\ the\ next\ frame\ if\ the\ time\ for\ the\ current\ frame\ has\ expired.\n
comment3.params=
comment3.target=void\ nextFrame()
-comment3.text=\r\n\ Advance\ to\ the\ next\ frame\ in\ the\ animation.\r\n
+comment3.text=\n\ Advance\ to\ the\ next\ frame\ in\ the\ animation.\n
comment4.params=
comment4.target=void\ loadImages()
-comment4.text=\r\n\ Load\ the\ images\r\n
+comment4.text=\n\ Load\ the\ images\n
numComments=5
View
Binary file not shown.
View
@@ -1,6 +1,6 @@
#BlueJ class context
-comment0.params=speed
-comment0.target=Player(int)
+comment0.params=
+comment0.target=Player()
comment1.params=
comment1.target=void\ act()
comment10.params=
View
@@ -23,9 +23,9 @@
protected GreenfootImage image8;
- public Player(int speed) {
+ public Player() {
this.initialSpeed = speed;
- this.speed = speed;
+ this.speed = 5;
//super(6);
getImage().scale(40, 40);
View
Binary file not shown.
View
@@ -22,20 +22,20 @@
public SkyscraperWorld() {
super(80, 80, 10);
currentLevel = 1;
+
+ player = new Player();
+
levelCompletePoints = loadLevel(currentLevel);
//backgroundMusic.playLoop();
- setPaintOrder(GameOverScreen.class, /*Overlay.class,*/ Counter.class, MenuBar.class, MovingWater.class, Player.class, Coin.class, Surface.class);
-
+ setPaintOrder(GameOverScreen.class, /*Overlay.class,*/ Counter.class, MenuBar.class, MovingWater.class, Player.class, Coin.class, Surface.class);
/**General stuff**/
addObject(movingWater = new MovingWater(), 40, 71);
addObject(new MenuBar(), 39, 75);
- player = new Player();
-
scoreCounter = new Counter("Score: ");
addObject(scoreCounter, 6, 74);
}
View
@@ -1,5 +1,5 @@
#BlueJ class context
comment0.params=
comment0.target=void\ act()
-comment0.text=\r\n\ Act\ -\ do\ whatever\ the\ Surface\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
+comment0.text=\n\ Act\ -\ do\ whatever\ the\ Surface\ wants\ to\ do.\ This\ method\ is\ called\ whenever\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\n
numComments=1
Oops, something went wrong.

0 comments on commit 166f356

Please sign in to comment.