Skip to content
Snippets Groups Projects
Commit ee325fa3 authored by dro024's avatar dro024
Browse files

Merge branch 'master' of git@git.app.uib.no:Arne.Reime/team_2.git

parents 6667a4dd 528a2264
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ import javafx.scene.paint.Paint;
public class Enemy implements IGameObject{
int x, y, w, h, distance;
int walkSpeed = 1;
int walkSpeed = 3;
int sum = 0;
private int gravity = 5;
Paint color;
......
......@@ -23,6 +23,7 @@ import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;
//push test
public class Game extends Application {
private AnimationTimer timer;
private Canvas canvas;
......@@ -125,15 +126,15 @@ public class Game extends Application {
scene.setOnKeyPressed(keyH::keyPressed);
scene.setOnKeyReleased(keyH::keyReleased);
ListWalls.add(new Wall(250, 400, 150, 20, Color.DARKGREEN));
ListWalls.add(new Wall(160, 570, 340, 120, Color.DARKGREEN));
ListWalls.add(new Wall(820, 570, 300, 120, Color.DARKGREEN));
ListWalls.add(new Wall(1200, 530, 300, 120, Color.DARKGREEN));
ListWalls.add(new Wall(250, 400, 150, 20, Color.DIMGRAY));
ListWalls.add(new Wall(160, 570, 340, 120, Color.DIMGRAY));
ListWalls.add(new Wall(820, 570, 300, 120, Color.DIMGRAY));
ListWalls.add(new Wall(1200, 530, 300, 120, Color.DIMGRAY));
ListWaffle.add(new Waffle(300, 350, 50, 50));
ListWaffle.add(new Waffle(1000, 400, 50, 50));
ListEnemy.add(new Enemy(700, 100, 50, 50, Color.RED, 200));
ListEnemy.add(new Enemy(700, 300, 50, 50, Color.RED, 200));
}
protected void step() {
......@@ -194,7 +195,7 @@ public class Game extends Application {
if (player.invincible) {
if (player.invincibleTimer == 0) {
player.invincible = false;
player.invincibleTimer = 50;
player.invincibleTimer = 100;
}
player.invincibleTimer--;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment