From bdbb628e312da0773ac0117d145c3d9ee60d47a2 Mon Sep 17 00:00:00 2001 From: Samantha Sullivan Date: Sun, 10 Sep 2023 19:53:03 +1000 Subject: [PATCH] clean up --- .../com/csse3200/game/components/tasks/MobAttackTask.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/core/src/main/com/csse3200/game/components/tasks/MobAttackTask.java b/source/core/src/main/com/csse3200/game/components/tasks/MobAttackTask.java index 60df50b4a..703024c8d 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/MobAttackTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/MobAttackTask.java @@ -124,6 +124,9 @@ public void updateMobState() { owner.getEntity().getEvents().trigger(STOW); mobState = STATE.STOW; } else { + if (this.meleeOrProjectile() instanceof Melee) { + + } Entity newProjectile = ProjectileFactory.createMobBall(PhysicsLayer.HUMANS, new Vector2(0, owner.getEntity().getPosition().y), new Vector2(2f,2f)); newProjectile.setPosition((float) (owner.getEntity().getPosition().x), (float) (owner.getEntity().getPosition().y)); newProjectile.setScale(-1f, 0.5f); @@ -227,4 +230,9 @@ private Weapon meleeOrProjectile() { return chosenWeapon; } + + private void setTarget() { + Vector2 newVector = new Vector2(owner.getEntity().getPosition().x - 10f, owner.getEntity().getPosition().y - 2f); + Fixture hitraycast = physics.raycastGetHit(owner.getEntity().getPosition(), newVector, TARGET); + } }