From cd64313dec8d23f4709442974b3e5c7261602f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Wed, 8 Jun 2022 20:18:22 +0200 Subject: [PATCH] add enemy but no interaction --- src/Entity/Player.java | 8 ++++++++ src/Screen/ScreenMap.java | 1 + src/testHER.java | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/src/Entity/Player.java b/src/Entity/Player.java index d8f6478..ff577ed 100644 --- a/src/Entity/Player.java +++ b/src/Entity/Player.java @@ -50,6 +50,8 @@ public class Player extends Character{ // Go setSpeed(sm.getSpeed(nextCell)); go(goalDirection); + } else { + } } else { // Face the wall @@ -76,6 +78,12 @@ public class Player extends Character{ } private boolean enemy() { + /* + Vector entities = testHER.getEntities; + for (Entity entity : entities) { + + } + */ return false; } diff --git a/src/Screen/ScreenMap.java b/src/Screen/ScreenMap.java index 9c70f2b..0dba65e 100644 --- a/src/Screen/ScreenMap.java +++ b/src/Screen/ScreenMap.java @@ -32,6 +32,7 @@ public class ScreenMap { public int tileWidth; private int height; public int tileHeight; + private void createMap(String name){ diff --git a/src/testHER.java b/src/testHER.java index 4a74342..a11d713 100644 --- a/src/testHER.java +++ b/src/testHER.java @@ -25,6 +25,10 @@ public class testHER extends PortableApplication{ sm = new ScreenMap(); } + public static Vector getEntities() { + return entities; + } + public static void main(String[] args) {