From 9a1a94d20f00a3dc210e93dc1a77c522b81d09ce Mon Sep 17 00:00:00 2001 From: Shivam Date: Sun, 10 Sep 2023 11:19:24 +1000 Subject: [PATCH 01/13] resolving merge conflict --- .../csse3200/game/areas/ForestGameArea.java | 246 ++++++++---------- .../game/entities/factories/TowerFactory.java | 20 +- 2 files changed, 118 insertions(+), 148 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index d55332ee1..126b2c5f2 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -101,8 +101,7 @@ public class ForestGameArea extends GameArea { "images/towers/mine_tower.png", - "images/towers/TNTTower.png", - "images/towers/DroidTower.png" + "images/towers/TNTTower.png" }; private static final String[] forestTextureAtlases = { "images/economy/econ-tower.atlas", @@ -115,19 +114,11 @@ public class ForestGameArea extends GameArea { "images/towers/stun_tower.atlas", "images/mobs/xenoGruntRunning.atlas", "images/xenoGrunt.atlas", - "images/towers/fire_tower_atlas.atlas", - "images/towers/stun_tower.atlas", - "images/mobs/xenoGruntRunning.atlas", - "images/mobs/robot.atlas", - "images/mobs/rangeBossRight.atlas", - "images/towers/DroidTower.atlas", - "images/xenoGrunt.atlas", "images/mobs/robot.atlas", "images/mobs/rangeBossRight.atlas", "images/towers/TNTTower.atlas", "images/projectiles/basic_projectile.atlas", "images/projectiles/mobProjectile.atlas" - }; private static final String[] forestSounds = { "sounds/Impact4.ogg", @@ -143,8 +134,8 @@ public class ForestGameArea extends GameArea { private final TerrainFactory terrainFactory; private Entity player; - - // Variables to be used with spawn projectile methods. This is the variable + + // Variables to be used with spawn projectile methods. This is the variable // that should occupy the direction param. private static final int towardsMobs = 100; private static final int towardsTowers = 0; @@ -169,40 +160,33 @@ public void create() { loadAssets(); displayUI(); spawnTerrain(); -// spawnBuilding1(); -// spawnBuilding2(); + spawnBuilding1(); + spawnBuilding2(); // spawnMountains(); player = spawnPlayer(); player.getEvents().addListener("spawnWave", this::spawnXenoGrunts); playMusic(); - // Types of projectile +// // Types of projectile // spawnAoeProjectile(new Vector2(0, 10), player, towardsMobs, new Vector2(2f, 2f), 1); // spawnProjectile(new Vector2(0, 10), player, towardsMobs, new Vector2(2f, 2f)); // spawnMultiProjectile(new Vector2(0, 10), player, towardsMobs, 20, new Vector2(2f, 2f), 7); - spawnEffectProjectile(new Vector2(0, 10), PhysicsLayer.HUMANS, towardsMobs, new Vector2(2f, 2f), ProjectileEffects.BURN, true); - spawnEffectProjectile(new Vector2(0, 10), PhysicsLayer.HUMANS, towardsMobs, new Vector2(2f, 2f), ProjectileEffects.BURN, true); spawnXenoGrunts(); - -// spawnGhosts(); + spawnGhosts(); spawnWeaponTower(); spawnIncome(); -// spawnScrap(); + spawnScrap(); -// bossKing1 = spawnBossKing1(); -// bossKing2 = spawnBossKing2(); + bossKing1 = spawnBossKing1(); + bossKing2 = spawnBossKing2(); playMusic(); - spawnTNTTower(); - spawnDroidTower(); spawnEngineer(); - spawnIncome(); -// bossKing1 = spawnBossKing1(); + bossKing1 = spawnBossKing1(); bossKing2 = spawnBossKing2(); spawnTNTTower(); - } private void displayUI() { @@ -241,26 +225,16 @@ private void spawnTerrain() { spawnEntityAt( ObstacleFactory.createWall(worldBounds.x, WALL_WIDTH), GridPoint2Utils.ZERO, false, false); } + private void spawnBuilding1() { + GridPoint2 minPos = new GridPoint2(0, 0); + GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); -// private void spawnMountains() { -// ArrayList fixedPositions = new ArrayList<>(); //Generating ArrayList -// -// fixedPositions.add(new GridPoint2(5, 8)); -// fixedPositions.add(new GridPoint2(12, 4)); -// fixedPositions.add(new GridPoint2(20, 10)); -// fixedPositions.add(new GridPoint2(33, 17)); -// -// for (GridPoint2 fixedPos : fixedPositions) { -// Entity tree = ObstacleFactory.createMountain(); -// spawnEntityAt(tree, fixedPos, true, false); -// } -// for (int i = 0; i < NUM_BUILDINGS; i++) { -// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); -// Entity building1 = ObstacleFactory.createBuilding1(); -// spawnEntityAt(building1, randomPos, true, false); -// } -// } - + for (int i = 0; i < NUM_BUILDINGS; i++) { + GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); + Entity building1 = ObstacleFactory.createBuilding1(); + spawnEntityAt(building1, randomPos, true, false); + } + } private void spawnBuilding2() { GridPoint2 minPos = new GridPoint2(0, 0); GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); @@ -275,11 +249,20 @@ private void spawnBuilding2() { // private void spawnMountains() { // ArrayList fixedPositions = new ArrayList<>(); //Generating ArrayList // +// fixedPositions.add(new GridPoint2(5, 8)); +// fixedPositions.add(new GridPoint2(12, 4)); +// fixedPositions.add(new GridPoint2(20, 10)); +// fixedPositions.add(new GridPoint2(33, 17)); // // for (GridPoint2 fixedPos : fixedPositions) { // Entity tree = ObstacleFactory.createMountain(); // spawnEntityAt(tree, fixedPos, true, false); // } +// for (int i = 0; i < NUM_BUILDINGS; i++) { +// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); +// Entity building1 = ObstacleFactory.createBuilding1(); +// spawnEntityAt(building1, randomPos, true, false); +// } // } private Entity spawnPlayer() { @@ -295,37 +278,37 @@ private Entity spawnPlayer(GridPoint2 position) { return newPlayer; } -// private void spawnGhosts() { -// GridPoint2 minPos = new GridPoint2(0, 0); -// GridPoint2 maxPos = terrain.getMapBounds(0).sub(0, 2); -// -// for (int i = 0; i < NUM_GHOSTS; i++) { -// int fixedX = terrain.getMapBounds(0).x - 1; // Rightmost x-coordinate -// int randomY = MathUtils.random(0, maxPos.y); -// GridPoint2 randomPos = new GridPoint2(fixedX, randomY); -// Entity ghost = createGhost(player); -// spawnEntityAt(ghost, randomPos, true, true); -// } -// } + private void spawnGhosts() { + GridPoint2 minPos = new GridPoint2(0, 0); + GridPoint2 maxPos = terrain.getMapBounds(0).sub(0, 2); -// private Entity spawnBossKing1() { -// GridPoint2 minPos = new GridPoint2(0, 0); -// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); -// GridPoint2 randomPos -// = new GridPoint2(0, 0); -// Entity ghostKing = NPCFactory.createGhostKing(player); -// spawnEntityAt(ghostKing, randomPos, true, true); -// return ghostKing; -// } + for (int i = 0; i < NUM_GHOSTS; i++) { + int fixedX = terrain.getMapBounds(0).x - 1; // Rightmost x-coordinate + int randomY = MathUtils.random(0, maxPos.y); + GridPoint2 randomPos = new GridPoint2(fixedX, randomY); + Entity ghost = createGhost(player); + spawnEntityAt(ghost, randomPos, true, true); + } + } + + private Entity spawnBossKing1() { + GridPoint2 minPos = new GridPoint2(0, 0); + GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); + GridPoint2 randomPos + = new GridPoint2(0, 0); + Entity ghostKing = NPCFactory.createGhostKing(player); + spawnEntityAt(ghostKing, randomPos, true, true); + return ghostKing; + } /** * Spawns a projectile that only heads towards the enemies in its lane. - * + * * @param position The position of the Entity that's shooting the projectile. * @param targetLayer The enemy layer of the "shooter". * @param direction The direction the projectile should head towards. * @param speed The speed of the projectiles. - * + * */ private void spawnProjectile(Vector2 position, short targetLayer, int direction, Vector2 speed) { Entity Projectile = ProjectileFactory.createFireBall(targetLayer, new Vector2(direction, position.y), speed); @@ -334,12 +317,12 @@ private void spawnProjectile(Vector2 position, short targetLayer, int direction, } /** * Spawns a projectile specifically for general mobs/xenohunters - * + * * @param position The position of the Entity that's shooting the projectile. * @param targetLayer The enemy layer of the "shooter". * @param direction The direction the projectile should head towards. * @param speed The speed of the projectiles. - * + * */ private void spawnMobBall(Vector2 position, short targetLayer, int direction, Vector2 speed) { Entity Projectile = ProjectileFactory.createMobBall(targetLayer, new Vector2(direction, position.y), speed); @@ -349,13 +332,13 @@ private void spawnMobBall(Vector2 position, short targetLayer, int direction, Ve /** * Spawns a projectile to be used for multiple projectile function. - * + * * @param position The position of the Entity that's shooting the projectile. * @param targetLayer The enemy layer of the "shooter". * @param space The space between the projectiles' destination. * @param direction The direction the projectile should head towards. * @param speed The speed of the projectiles. - * + * */ private void spawnProjectile(Vector2 position, short targetLayer, int space, int direction, Vector2 speed) { Entity Projectile = ProjectileFactory.createFireBall(targetLayer, new Vector2(direction, position.y + space), speed); @@ -363,20 +346,20 @@ private void spawnProjectile(Vector2 position, short targetLayer, int space, in spawnEntity(Projectile); } - // private Entity spawnBossKing() { - // for (int i = 0; i < NUM_BOSS; i++) { - // int fixedX = terrain.getMapBounds(0).x - 1; // Rightmost x-coordinate - // int randomY = MathUtils.random(0, maxPos.y); - // GridPoint2 randomPos = new GridPoint2(fixedX, randomY); - // bossKing1 = BossKingFactory.createBossKing1(player); - // spawnEntityAt(bossKing1, - // randomPos, - // true, - // false); - // } - // return bossKing1; - - // } +// private Entity spawnBossKing() { +// for (int i = 0; i < NUM_BOSS; i++) { +// int fixedX = terrain.getMapBounds(0).x - 1; // Rightmost x-coordinate +// int randomY = MathUtils.random(0, maxPos.y); +// GridPoint2 randomPos = new GridPoint2(fixedX, randomY); +// bossKing1 = BossKingFactory.createBossKing1(player); +// spawnEntityAt(bossKing1, +// randomPos, +// true, +// false); +// } +// return bossKing1; +// +// } private void spawnXenoGrunts() { @@ -391,17 +374,17 @@ private void spawnXenoGrunts() { } } -// private Entity spawnGhostKing() { -// GridPoint2 minPos = new GridPoint2(0, 0); -// GridPoint2 maxPos = terrain.getMapBounds(0).sub(0, 0); -// GridPoint2 randomPos -// = RandomUtils.random(minPos, maxPos); -// // = new GridPoint2(26, 26); -// Entity ghostKing = NPCFactory.createGhostKing(player); -// spawnEntityAt(ghostKing, randomPos, true, true); -// return ghostKing; -// -// } + private Entity spawnGhostKing() { + GridPoint2 minPos = new GridPoint2(0, 0); + GridPoint2 maxPos = terrain.getMapBounds(0).sub(0, 0); + GridPoint2 randomPos + = RandomUtils.random(minPos, maxPos); + // = new GridPoint2(26, 26); + Entity ghostKing = NPCFactory.createGhostKing(player); + spawnEntityAt(ghostKing, randomPos, true, true); + return ghostKing; + + } private Entity spawnBossKing2() { GridPoint2 minPos = new GridPoint2(0, 0); @@ -421,9 +404,9 @@ private Entity spawnBossKing2() { } /** - * Creates multiple projectiles that travel simultaneous. They all have same + * Creates multiple projectiles that travel simultaneous. They all have same * the starting point but different destinations. - * + * * @param position The position of the Entity that's shooting the projectile. * @param targetLayer The enemy layer of the "shooter". * @param direction The direction the projectile should head towards. @@ -431,17 +414,17 @@ private Entity spawnBossKing2() { * @param speed The speed of the projectiles. * @param quantity The amount of projectiles to spawn. */ -// private void spawnMultiProjectile(Vector2 position, short targetLayer, int direction, int space, Vector2 speed, int quantity) { -// int half = quantity / 2; -// for (int i = 0; i < quantity; i++) { -// spawnProjectile(position, targetLayer, space * half, direction, speed); -// --half; -// } -// } + private void spawnMultiProjectile(Vector2 position, short targetLayer, int direction, int space, Vector2 speed, int quantity) { + int half = quantity / 2; + for (int i = 0; i < quantity; i++) { + spawnProjectile(position, targetLayer, space * half, direction, speed); + --half; + } + } /** * Returns projectile that can do an area of effect damage - * + * * @param position The position of the Entity that's shooting the projectile. * @param targetLayer The enemy layer of the "shooter". * @param direction The direction the projectile should head towards. @@ -464,7 +447,7 @@ private void spawnWeaponTower() { GridPoint2 randomPos1 = RandomUtils.random(minPos, maxPos); GridPoint2 randomPos2 = RandomUtils.random(minPos, maxPos); //Entity weaponTower = TowerFactory.createWeaponTower(); -// Entity wallTower = TowerFactory.createWallTower(); + Entity wallTower = TowerFactory.createWallTower(); Entity fireTower = TowerFactory.createFireTower(); Entity stunTower = TowerFactory.createStunTower(); //spawnEntityAt(weaponTower, randomPos, true, true); @@ -486,18 +469,6 @@ private void spawnTNTTower() { } - private void spawnDroidTower() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); - - for (int i = 0; i < NUM_WEAPON_TOWERS; i++) { - GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); - Entity weaponTower = TowerFactory.createDroidTower(); - spawnEntityAt(weaponTower, randomPos, true, true); - } - - } - private void playMusic() { Music music = ServiceLocator.getResourceService().getAsset(backgroundMusic, Music.class); @@ -536,29 +507,28 @@ public void dispose() { this.unloadAssets(); } + private void spawnScrap() { + GridPoint2 minPos = new GridPoint2(0, 0); + GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); -// private void spawnScrap() { -// GridPoint2 minPos = new GridPoint2(0, 0); -// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); -// -// for (int i = 0; i < 5; i++) { -// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); -// Entity scrap = DropFactory.createScrapDrop(); -// spawnEntityAt(scrap, randomPos, true, false); -// } -// -// for (int i = 0; i < 5; i++) { -// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); -// Entity crystal = DropFactory.createCrystalDrop(); -// spawnEntityAt(crystal, randomPos, true, false); -// } -// } + for (int i = 0; i < 5; i++) { + GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); + Entity scrap = DropFactory.createScrapDrop(); + spawnEntityAt(scrap, randomPos, true, false); + } + + for (int i = 0; i < 5; i++) { + GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); + Entity crystal = DropFactory.createCrystalDrop(); + spawnEntityAt(crystal, randomPos, true, false); + } + } private void spawnIncome() { GridPoint2 minPos = new GridPoint2(0, 0); GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); - for (int i = 0; i < 2; i++) { + for (int i = 0; i < 50; i++) { GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); Entity towerfactory = TowerFactory.createIncomeTower(); spawnEntityAt(towerfactory, randomPos, true, true); diff --git a/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java index bf1aa2807..cd0cf1515 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java @@ -125,16 +125,16 @@ public static Entity createIncomeTower() { return income; } -// public static Entity createWallTower() { -// Entity wall = createBaseTower(); -// WallTowerConfig config = configs.wall; -// -// wall -// .addComponent(new CombatStatsComponent(config.health, config.baseAttack)) -// .addComponent(new CostComponent(config.cost)) -// .addComponent(new TextureRenderComponent(WALL_IMAGE)); -// return wall; -// } + public static Entity createWallTower() { + Entity wall = createBaseTower(); + WallTowerConfig config = configs.wall; + + wall + .addComponent(new CombatStatsComponent(config.health, config.baseAttack)) + .addComponent(new CostComponent(config.cost)) + .addComponent(new TextureRenderComponent(WALL_IMAGE)); + return wall; + } /** From 7fa6b86dfb67d3a44284c9509bf708c6e922a45a Mon Sep 17 00:00:00 2001 From: Shivam Date: Sun, 10 Sep 2023 12:04:03 +1000 Subject: [PATCH 02/13] added basic tests for StunTower and FireTower --- .../entities/factories/TowerFactoryTest.java | 45 +++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java b/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java index 0924d2667..a2951fb38 100644 --- a/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java +++ b/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java @@ -39,6 +39,8 @@ public class TowerFactoryTest { private Entity baseTower; private Entity weaponTower; private Entity wallTower; + private Entity stunTower; + private Entity fireTower; private String[] texture = { "images/towers/turret_deployed.png", "images/towers/turret01.png", @@ -71,6 +73,8 @@ public void setUp() { baseTower = TowerFactory.createBaseTower(); weaponTower = TowerFactory.createWeaponTower(); wallTower = TowerFactory.createWallTower(); + fireTower = TowerFactory.createFireTower(); + stunTower = TowerFactory.createFireTower(); } @Test @@ -79,6 +83,8 @@ public void testCreateBaseTowerNotNull() { assertNotNull(baseTower, "Base tower should not be null"); assertNotNull(weaponTower, "Weaponry tower should not be null"); assertNotNull(wallTower, "Wall tower should not be null"); + assertNotNull(stunTower, "Stun tower must not be null"); + assertNotNull(fireTower, "Stun tower must not be null"); } @Test @@ -89,6 +95,10 @@ public void testCreateBaseTowerHasColliderComponent() { "Weaponry tower should have ColliderComponent"); assertNotNull(wallTower.getComponent(ColliderComponent.class), "Wall tower should have ColliderComponent"); + assertNotNull(stunTower.getComponent(ColliderComponent.class), + "Stun Tower should have ColliderComponent"); + assertNotNull(fireTower.getComponent(ColliderComponent.class), + "Fire tower should have ColliderComponent"); } @Test @@ -99,6 +109,10 @@ public void testCreateBaseTowerHasHitboxComponent() { "Weaponry tower should have HitboxComponent"); assertNotNull(wallTower.getComponent(HitboxComponent.class), "Wall tower should have HitboxComponent"); + assertNotNull(stunTower.getComponent(HitboxComponent.class), + "Stun tower should have HitboxComponent"); + assertNotNull(fireTower.getComponent(HitboxComponent.class), + "Fire tower should have HitboxComponent"); } @Test @@ -109,6 +123,10 @@ public void testCreateBaseTowerHasPhysicsComponent() { "Weaponry tower should have PhysicsComponent"); assertNotNull(wallTower.getComponent(PhysicsComponent.class), "Wall tower should have PhysicsComponent"); + assertNotNull(stunTower.getComponent(PhysicsComponent.class), + "Stun tower should have PhysicsComponent"); + assertNotNull(fireTower.getComponent(PhysicsComponent.class), + "Fire tower should have PhysicsComponent"); } @Test @@ -116,6 +134,8 @@ public void testCreateBaseTowerPhysicsComponentStaticBody() { PhysicsComponent physicsComponent = baseTower.getComponent(PhysicsComponent.class); PhysicsComponent physicsComponent1 = weaponTower.getComponent(PhysicsComponent.class); PhysicsComponent physicsComponent2 = wallTower.getComponent(PhysicsComponent.class); + PhysicsComponent physicsComponent3 = stunTower.getComponent(PhysicsComponent.class); + PhysicsComponent physicsComponent4 = fireTower.getComponent(PhysicsComponent.class); assertTrue(physicsComponent.getBody().getType() == BodyType.StaticBody, "PhysicsComponent should be of type StaticBody"); @@ -123,18 +143,33 @@ public void testCreateBaseTowerPhysicsComponentStaticBody() { "PhysicsComponent1 should be of type StaticBody"); assertTrue(physicsComponent2.getBody().getType() == BodyType.StaticBody, "PhysicsComponent2 should be of type StaticBody"); + assertTrue(physicsComponent3.getBody().getType() == BodyType.StaticBody, + "StunTower's PhysicsComponent should be of type StaticBody"); + assertTrue(physicsComponent4.getBody().getType() == BodyType.StaticBody, + "FireTower's PhysicsComponent should be of type StaticBody"); } @Test public void testWeaponTowerCombatStatsComponentAndCostComponent() { - assertTrue(weaponTower.getComponent(CombatStatsComponent.class).getHealth() == 10, + assertEquals(10, weaponTower.getComponent(CombatStatsComponent.class).getHealth(), "Health should be 10"); - assertTrue(weaponTower.getComponent(CombatStatsComponent.class).getBaseAttack() == 10, + assertEquals(10, weaponTower.getComponent(CombatStatsComponent.class).getBaseAttack(), "BaseAttack should be 10"); - assertTrue(weaponTower.getComponent(CostComponent.class).getCost() == 10, + assertEquals(10, weaponTower.getComponent(CostComponent.class).getCost(), "Cost should be 10"); - + assertEquals(10, fireTower.getComponent(CombatStatsComponent.class).getHealth(), + "Fire Tower health must be 10"); + assertEquals(10, fireTower.getComponent(CombatStatsComponent.class).getBaseAttack(), + "Fire Tower base attack must be 10"); + assertEquals(10, fireTower.getComponent(CostComponent.class).getCost(), + "Fire Tower cost must 10"); + assertEquals(10, stunTower.getComponent(CombatStatsComponent.class).getHealth(), + "Stun Tower health must be 10"); + assertEquals(5, stunTower.getComponent(CombatStatsComponent.class).getBaseAttack(), + "Stun Tower base attack must be 10"); + assertEquals(10, fireTower.getComponent(CostComponent.class).getCost(), + "Stun Tower cost must 10"); } @Test @@ -152,6 +187,8 @@ public void testWallTowerCombatStatsComponentAndCostComponent() { @Test public void weaponTowerHasAnimationComponent() { assertNotNull(weaponTower.getComponent(AnimationRenderComponent.class)); + assertNotNull(stunTower.getComponent(AnimationRenderComponent.class)); + assertNotNull(fireTower.getComponent(AnimationRenderComponent.class)); } @Test From 0934f985b4d4b0772c036f9e19cb6ab12a70d43e Mon Sep 17 00:00:00 2001 From: Shivam Date: Sun, 10 Sep 2023 12:23:42 +1000 Subject: [PATCH 03/13] Fixed failing tests --- .../csse3200/game/entities/factories/TowerFactory.java | 3 +-- .../game/entities/factories/TowerFactoryTest.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java index cd0cf1515..279ec3e4e 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java @@ -314,8 +314,7 @@ public static Entity createBaseTower() { .addComponent(new ColliderComponent()) .addComponent(new HitboxComponent().setLayer(PhysicsLayer.TOWER)) // TODO: we might have to change the names of the layers .addComponent(new PhysicsComponent().setBodyType(BodyType.StaticBody)) - .addComponent(new TowerUpgraderComponent()) - .addComponent(new HitboxComponent().setLayer(PhysicsLayer.TOWER)); // TODO: we might have to change the names of the layers + .addComponent(new TowerUpgraderComponent()); return tower; } diff --git a/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java b/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java index a2951fb38..302083ace 100644 --- a/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java +++ b/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java @@ -44,9 +44,15 @@ public class TowerFactoryTest { private String[] texture = { "images/towers/turret_deployed.png", "images/towers/turret01.png", - "images/towers/wallTower.png" + "images/towers/wallTower.png", + "images/towers/fire_tower_atlas.png", + "images/towers/stun_tower.png" + }; + private String[] atlas = { + "images/towers/turret01.atlas", + "images/towers/stun_tower.atlas", + "images/towers/fire_tower_atlas.atlas" }; - private String[] atlas = {"images/towers/turret01.atlas"}; private static final String[] sounds = { "sounds/towers/gun_shot_trimmed.mp3", "sounds/towers/deploy.mp3", From a1223c767faf4bf5e3b2f79b8d2839beb27a4895 Mon Sep 17 00:00:00 2001 From: Shivam Date: Sun, 10 Sep 2023 12:31:41 +1000 Subject: [PATCH 04/13] fixed 'fixed' failing tests --- .../com/csse3200/game/entities/factories/TowerFactoryTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java b/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java index 302083ace..81596fca0 100644 --- a/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java +++ b/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java @@ -172,7 +172,7 @@ public void testWeaponTowerCombatStatsComponentAndCostComponent() { "Fire Tower cost must 10"); assertEquals(10, stunTower.getComponent(CombatStatsComponent.class).getHealth(), "Stun Tower health must be 10"); - assertEquals(5, stunTower.getComponent(CombatStatsComponent.class).getBaseAttack(), + assertEquals(10, stunTower.getComponent(CombatStatsComponent.class).getBaseAttack(), "Stun Tower base attack must be 10"); assertEquals(10, fireTower.getComponent(CostComponent.class).getCost(), "Stun Tower cost must 10"); From b5e8667a779fb219813929422e2577452cdcb68e Mon Sep 17 00:00:00 2001 From: Shivam Date: Sun, 10 Sep 2023 13:51:40 +1000 Subject: [PATCH 05/13] added death condition and animation for StunTower --- .../assets/images/towers/stun_tower.atlas | 102 +++++++++++++---- .../core/assets/images/towers/stun_tower.png | Bin 7075 -> 14627 bytes .../csse3200/game/areas/ForestGameArea.java | 106 +++++++++--------- .../components/tasks/DroidCombatTask.java | 5 +- .../components/tasks/StunTowerCombatTask.java | 18 ++- .../tower/StunTowerAnimationController.java | 10 ++ 6 files changed, 162 insertions(+), 79 deletions(-) diff --git a/source/core/assets/images/towers/stun_tower.atlas b/source/core/assets/images/towers/stun_tower.atlas index f0033a197..4cae61f81 100644 --- a/source/core/assets/images/towers/stun_tower.atlas +++ b/source/core/assets/images/towers/stun_tower.atlas @@ -1,118 +1,174 @@ stun_tower.png -size: 1024, 64 +size: 256, 256 format: RGBA8888 filter: Nearest, Nearest repeat: none attack rotate: false - xy: 2, 2 + xy: 59, 207 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 4 attack rotate: false - xy: 116, 2 + xy: 173, 207 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 9 attack rotate: false - xy: 173, 2 + xy: 2, 160 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 1 attack rotate: false - xy: 230, 2 + xy: 2, 113 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 6 attack rotate: false - xy: 344, 2 + xy: 2, 19 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 3 attack rotate: false - xy: 458, 2 + xy: 116, 160 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 8 attack rotate: false - xy: 572, 2 + xy: 59, 113 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 0 attack rotate: false - xy: 629, 2 + xy: 59, 66 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 5 attack rotate: false - xy: 743, 2 + xy: 116, 113 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 2 attack rotate: false - xy: 800, 2 + xy: 173, 113 size: 55, 45 orig: 55, 45 offset: 0, 0 index: 7 +death + rotate: false + xy: 116, 76 + size: 40, 35 + orig: 40, 35 + offset: 0, 0 + index: 6 +death + rotate: false + xy: 116, 39 + size: 40, 35 + orig: 40, 35 + offset: 0, 0 + index: 3 +death + rotate: false + xy: 116, 2 + size: 40, 35 + orig: 40, 35 + offset: 0, 0 + index: 0 +death + rotate: false + xy: 158, 76 + size: 40, 35 + orig: 40, 35 + offset: 0, 0 + index: 5 +death + rotate: false + xy: 200, 76 + size: 40, 35 + orig: 40, 35 + offset: 0, 0 + index: 2 +death + rotate: false + xy: 158, 39 + size: 40, 35 + orig: 40, 35 + offset: 0, 0 + index: 7 +death + rotate: false + xy: 158, 2 + size: 40, 35 + orig: 40, 35 + offset: 0, 0 + index: 4 +death + rotate: false + xy: 200, 39 + size: 40, 35 + orig: 40, 35 + offset: 0, 0 + index: 1 idle rotate: false - xy: 59, 2 + xy: 2, 207 size: 55, 45 orig: 55, 45 offset: 0, 0 - index: 1 + index: 4 idle rotate: false - xy: 287, 2 + xy: 116, 207 size: 55, 45 orig: 55, 45 offset: 0, 0 - index: 3 + index: 1 idle rotate: false - xy: 401, 2 + xy: 2, 66 size: 55, 45 orig: 55, 45 offset: 0, 0 - index: 0 + index: 3 idle rotate: false - xy: 515, 2 + xy: 59, 160 size: 55, 45 orig: 55, 45 offset: 0, 0 - index: 5 + index: 0 idle rotate: false - xy: 686, 2 + xy: 173, 160 size: 55, 45 orig: 55, 45 offset: 0, 0 - index: 2 + index: 5 idle rotate: false - xy: 857, 2 + xy: 59, 19 size: 55, 45 orig: 55, 45 offset: 0, 0 - index: 4 + index: 2 diff --git a/source/core/assets/images/towers/stun_tower.png b/source/core/assets/images/towers/stun_tower.png index 025b35a4c77b083e3575c76a7ebd8547028f1531..f88d66a1d1605a0cf82dacbf6cf12943f6d7e6d2 100644 GIT binary patch literal 14627 zcma)jWk6I>*Y262yFq&BkPZbw7z7C^3F(sVMnYmp0qJf~N<=`qq*Gc#x=XrYfC294 z`+ncOKkxoAb7s!kYoD|B*=IfLS!+kUR*}QQrosjQ08c?)MjZe^$U_i-iH`g-aQ$Kl z03y2zGE$meMhAYkZZv%!j=`Fz71tk zl5A;K05_SIgphEBsKASMpD(wsFzqE(_DJ~sOjm3a&6)++2EZXA~Jvc=MX z$r=F&lK05O)EYAr?J{>V(k*4S$ARQl%(*3i*?$*p1x^TnBS9Pq%xgC~hab&;n>@Tx zfWK>7*SQm`z2|uVgXgGTuvZE(D!iK4T>btKSt~W}!4+YA4h+O#VOlGmu98b$-($VPUVkQ0tPH{h>HK+ zUV9ws;<#t*uBt38Ai{x^(_de^uiNTa?0W{~V4t|rXM7}I*_#V>ZJ9AzX*x+I1j&8c9+3`6p8pvQk=cEq}ynjTSt9`fbcB%;i9iZ&K(xAxDyKn6{ zk)O`R07kSJMh-jTv5P-sycH%CNC^?V(o60{=Y z$su0@c6k@f6U9~b0v@sURASEWV`{xV-5)Smpyz(tQKr05*;7y3C)X*dXLfNyY#$fg zwLQ%Uf~X+GG1HE?Pk14D9DIzC*dwQ%isPvJ)y`Pz*Pb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m${g2XPEVEJ%Vpn-k-EV(JtMsz*Jez6A+S%D~{(RTW_+JwT_rn zoGb<^RXz|QfWAe8?@DY}D&MOti7M+9%yWB|&{wf1V+b$@q=az+Vv1n1R3tyG6dAH4yx(`i=kP$p4uJ1=Dy-@QihSlGJh2OL5FIonW*0I`PdE12AXX7KaW+8e>|Fw z!4r9}Ie(~>1jYV@E{q{w`IrMSV-?TQXzJR<(kL4uZ=}{C$m{R{dxb1jm^4=M(joEs zRL4zHMWh_;3@tQ{sH*{sLCz)>Uq{zkR}>DODmND1Gs zX>B^3PYWb>5oU3KZq`0-AoUZF!<@s;tJ)IXHCC@G;PiRhX6C3x#yjbhI;>VyW(PlJ+B_^1 zRpkxo*(GU{Iu-|W1p)0B11iLm_rcXqxGXZ_iT*;w6T2EJu$YjG4K3+i;b4`E3ig{O zEk@0+p%s|-mT!i`RHdw+*q+o}(vF~MV?TA(`|W=zIh=b8y*y5(-AV5 zl%2P}uE)}l!fv}x$z8fOi9ZCBo@m4I z9LwAxmH6VG7*sb!h#YE=P=afC9lKL2Y*yp->G|CXZhdhYs%pd2Bp+kr`pO_KM`?&n z)B%+IxSo&b#kKTl42Cj)=A(+yp*r4(#krni*QKcxisg0cC9{8?A0#ibN=%k=0fxk0 zz&DBU@6r;?vPRBRae@Jc1?SYm{% zg?m`92Zm uVD7fCPR-!hnVT~I-7Wh6c6N4#!P4Tx^Y)`|&HaNtI8#Fl1Ek)anEwG=ED5pz diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index 126b2c5f2..2cdc64810 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -160,7 +160,7 @@ public void create() { loadAssets(); displayUI(); spawnTerrain(); - spawnBuilding1(); +// spawnBuilding1(); spawnBuilding2(); // spawnMountains(); player = spawnPlayer(); @@ -174,10 +174,10 @@ public void create() { // spawnMultiProjectile(new Vector2(0, 10), player, towardsMobs, 20, new Vector2(2f, 2f), 7); spawnEffectProjectile(new Vector2(0, 10), PhysicsLayer.HUMANS, towardsMobs, new Vector2(2f, 2f), ProjectileEffects.BURN, true); spawnXenoGrunts(); - spawnGhosts(); +// spawnGhosts(); spawnWeaponTower(); - spawnIncome(); - spawnScrap(); +// spawnIncome(); +// spawnScrap(); bossKing1 = spawnBossKing1(); bossKing2 = spawnBossKing2(); @@ -225,16 +225,16 @@ private void spawnTerrain() { spawnEntityAt( ObstacleFactory.createWall(worldBounds.x, WALL_WIDTH), GridPoint2Utils.ZERO, false, false); } - private void spawnBuilding1() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); - - for (int i = 0; i < NUM_BUILDINGS; i++) { - GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); - Entity building1 = ObstacleFactory.createBuilding1(); - spawnEntityAt(building1, randomPos, true, false); - } - } +// private void spawnBuilding1() { +// GridPoint2 minPos = new GridPoint2(0, 0); +// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); +// +// for (int i = 0; i < NUM_BUILDINGS; i++) { +// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); +// Entity building1 = ObstacleFactory.createBuilding1(); +// spawnEntityAt(building1, randomPos, true, false); +// } +// } private void spawnBuilding2() { GridPoint2 minPos = new GridPoint2(0, 0); GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); @@ -278,18 +278,18 @@ private Entity spawnPlayer(GridPoint2 position) { return newPlayer; } - private void spawnGhosts() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(0, 2); - - for (int i = 0; i < NUM_GHOSTS; i++) { - int fixedX = terrain.getMapBounds(0).x - 1; // Rightmost x-coordinate - int randomY = MathUtils.random(0, maxPos.y); - GridPoint2 randomPos = new GridPoint2(fixedX, randomY); - Entity ghost = createGhost(player); - spawnEntityAt(ghost, randomPos, true, true); - } - } +// private void spawnGhosts() { +// GridPoint2 minPos = new GridPoint2(0, 0); +// GridPoint2 maxPos = terrain.getMapBounds(0).sub(0, 2); +// +// for (int i = 0; i < NUM_GHOSTS; i++) { +// int fixedX = terrain.getMapBounds(0).x - 1; // Rightmost x-coordinate +// int randomY = MathUtils.random(0, maxPos.y); +// GridPoint2 randomPos = new GridPoint2(fixedX, randomY); +// Entity ghost = createGhost(player); +// spawnEntityAt(ghost, randomPos, true, true); +// } +// } private Entity spawnBossKing1() { GridPoint2 minPos = new GridPoint2(0, 0); @@ -507,34 +507,34 @@ public void dispose() { this.unloadAssets(); } - private void spawnScrap() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); - - for (int i = 0; i < 5; i++) { - GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); - Entity scrap = DropFactory.createScrapDrop(); - spawnEntityAt(scrap, randomPos, true, false); - } - - for (int i = 0; i < 5; i++) { - GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); - Entity crystal = DropFactory.createCrystalDrop(); - spawnEntityAt(crystal, randomPos, true, false); - } - } - - private void spawnIncome() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); +// private void spawnScrap() { +// GridPoint2 minPos = new GridPoint2(0, 0); +// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); +// +// for (int i = 0; i < 5; i++) { +// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); +// Entity scrap = DropFactory.createScrapDrop(); +// spawnEntityAt(scrap, randomPos, true, false); +// } +// +// for (int i = 0; i < 5; i++) { +// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); +// Entity crystal = DropFactory.createCrystalDrop(); +// spawnEntityAt(crystal, randomPos, true, false); +// } +// } - for (int i = 0; i < 50; i++) { - GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); - Entity towerfactory = TowerFactory.createIncomeTower(); - spawnEntityAt(towerfactory, randomPos, true, true); - } - } - +// private void spawnIncome() { +// GridPoint2 minPos = new GridPoint2(0, 0); +// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); +// +// for (int i = 0; i < 50; i++) { +// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); +// Entity towerfactory = TowerFactory.createIncomeTower(); +// spawnEntityAt(towerfactory, randomPos, true, true); +// } +// } +// private void spawnEngineer() { for (int i = 0; i < terrain.getMapBounds(0).x; i += 3) { diff --git a/source/core/src/main/com/csse3200/game/components/tasks/DroidCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/DroidCombatTask.java index 8512c2221..53eb8aa5f 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/DroidCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/DroidCombatTask.java @@ -149,8 +149,9 @@ public void updateTowerState() { } } case DIE -> { - if (owner.getEntity().getComponent(AnimationRenderComponent.class).isFinished()) - owner.getEntity().setFlagForDelete(true); + if (owner.getEntity().getComponent(AnimationRenderComponent.class).isFinished()) { + owner.getEntity().setFlagForDelete(true); + } } } } diff --git a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java index 2919d49bc..b3196d8e3 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java @@ -3,11 +3,13 @@ import com.badlogic.gdx.math.Vector2; import com.csse3200.game.ai.tasks.DefaultTask; import com.csse3200.game.ai.tasks.PriorityTask; +import com.csse3200.game.components.CombatStatsComponent; import com.csse3200.game.entities.Entity; import com.csse3200.game.entities.factories.ProjectileFactory; import com.csse3200.game.physics.PhysicsEngine; import com.csse3200.game.physics.PhysicsLayer; import com.csse3200.game.physics.raycast.RaycastHit; +import com.csse3200.game.rendering.AnimationRenderComponent; import com.csse3200.game.services.GameTime; import com.csse3200.game.services.ServiceLocator; @@ -23,6 +25,7 @@ public class StunTowerCombatTask extends DefaultTask implements PriorityTask { //Following constants are names of events that will be triggered in the state machine public static final String IDLE = "startIdle"; public static final String ATTACK = "startAttack"; + public static final String DEATH = "startDeath"; //Following are the class constants private final int priority; @@ -36,7 +39,7 @@ public class StunTowerCombatTask extends DefaultTask implements PriorityTask { //enums for the state triggers private enum STATE { - IDLE, ATTACK + IDLE, ATTACK, DIE } private STATE towerState = STATE.IDLE; @@ -82,6 +85,14 @@ public void update() { * of the game. If enemies are detected, state of the tower is changed to attack state. */ public void updateTowerState() { + + if (owner.getEntity().getComponent(CombatStatsComponent.class).getHealth() <= 0 && + towerState != STATE.DIE) { + owner.getEntity().getEvents().trigger(DEATH); + towerState = STATE.DIE; + return; + } + switch (towerState) { case IDLE -> { if(isTargetVisible()) { @@ -102,6 +113,11 @@ public void updateTowerState() { ServiceLocator.getEntityService().register(newProjectile); } } + case DIE -> { + if (owner.getEntity().getComponent(AnimationRenderComponent.class).isFinished()) { + owner.getEntity().setFlagForDelete(true); + } + } } } diff --git a/source/core/src/main/com/csse3200/game/components/tower/StunTowerAnimationController.java b/source/core/src/main/com/csse3200/game/components/tower/StunTowerAnimationController.java index fa4868c4c..846d344dd 100644 --- a/source/core/src/main/com/csse3200/game/components/tower/StunTowerAnimationController.java +++ b/source/core/src/main/com/csse3200/game/components/tower/StunTowerAnimationController.java @@ -12,9 +12,11 @@ public class StunTowerAnimationController extends Component { //Event name constants private static final String IDLE = "startIdle"; private static final String ATTACK = "startAttack"; + private static final String DEATH = "startDeath"; //animation name constants private static final String IDLE_ANIM = "idle"; private static final String ATTACK_ANIM = "attack"; + private static final String DEATH_ANIM = "death"; //further sounds can be added for the tower attacks/movement @@ -30,6 +32,7 @@ public void create() { animator = this.entity.getComponent(AnimationRenderComponent.class); entity.getEvents().addListener(IDLE, this::animateIdle); entity.getEvents().addListener(ATTACK, this::animateAttack); + entity.getEvents().addListener(DEATH, this::animateDeath); } /** @@ -45,4 +48,11 @@ void animateIdle() { void animateAttack() { animator.startAnimation(ATTACK_ANIM); } + + /** + * starts the death animation + */ + void animateDeath() { + animator.startAnimation(DEATH_ANIM); + } } From a26c4a87133a27dc092fd659393aea7a70e8de11 Mon Sep 17 00:00:00 2001 From: Shivam Date: Sun, 10 Sep 2023 15:28:40 +1000 Subject: [PATCH 06/13] added death animation for StunTower --- .../images/towers/fire_tower_atlas.atlas | 16 +- .../assets/images/towers/fire_tower_atlas.png | Bin 6334 -> 6467 bytes .../csse3200/game/areas/ForestGameArea.java | 142 +++++++++--------- .../components/tasks/StunTowerCombatTask.java | 2 +- 4 files changed, 80 insertions(+), 80 deletions(-) diff --git a/source/core/assets/images/towers/fire_tower_atlas.atlas b/source/core/assets/images/towers/fire_tower_atlas.atlas index 7c9ce2206..2f594a3b8 100644 --- a/source/core/assets/images/towers/fire_tower_atlas.atlas +++ b/source/core/assets/images/towers/fire_tower_atlas.atlas @@ -55,29 +55,29 @@ idle index: 0 idle rotate: false - xy: 542, 2 + xy: 482, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 index: 2 -prep_attack +prepAttack rotate: false xy: 2, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 - index: 1 -prep_attack + index: 2 +prepAttack rotate: false xy: 242, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 - index: 0 -prep_attack + index: 1 +prepAttack rotate: false - xy: 482, 2 + xy: 542, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 - index: 2 + index: 0 diff --git a/source/core/assets/images/towers/fire_tower_atlas.png b/source/core/assets/images/towers/fire_tower_atlas.png index a8c5cc3ee2af7ab5d8115c7d0930244de40b6dcd..71cae9af0d51df1bff0db6233db2df7fd8ab74a5 100644 GIT binary patch literal 6467 zcmZu$dpy(a`*)6fmC{3+Lp>!GCV7~Zb87WCq*Tu4RGu7~GqJT0g;-L^Xi7Q6%%M5k z$f>k*HPVR#_h(A z^oo@DPs$TVZ6C_+4;1pb^z_93OOm$FMJ2Db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zd$aLV6rM_}sL2A?9)ZaU5w3bm7~n0m=6^XZ#FqwVp*A56ycdtW*AM~#FXF0$z8~`( zS0!I5b?yI2H1Y>NW&*YARC&X;+*rbiWt@|_TU|Cg;FR6-buYu`}-Mg zKIK}Ods3+_OxSDsu==tSaf4Z6RO{!aur1+@C)cD|Kw0l@ia}i0Qt;5k49&+68U{DV zi#IKs^uVN9#bAs*-JENsiAy5}{6{o8sOB0FE56xC0>)3NZs;%K2(Dtd0bluut2P7c qa)0_ay6g^c?Yi*)|34-dS0iD8R?(-<6W9Kpa5{DFWVzkdxc>tA#3s}L diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index 2cdc64810..a7e59f9ac 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -161,7 +161,7 @@ public void create() { displayUI(); spawnTerrain(); // spawnBuilding1(); - spawnBuilding2(); +// spawnBuilding2(); // spawnMountains(); player = spawnPlayer(); player.getEvents().addListener("spawnWave", this::spawnXenoGrunts); @@ -179,14 +179,14 @@ public void create() { // spawnIncome(); // spawnScrap(); - bossKing1 = spawnBossKing1(); - bossKing2 = spawnBossKing2(); +// bossKing1 = spawnBossKing1(); +// bossKing2 = spawnBossKing2(); playMusic(); - spawnEngineer(); - bossKing1 = spawnBossKing1(); - bossKing2 = spawnBossKing2(); - spawnTNTTower(); +// spawnEngineer(); +// bossKing1 = spawnBossKing1(); +// bossKing2 = spawnBossKing2(); +// spawnTNTTower(); } private void displayUI() { @@ -235,16 +235,16 @@ private void spawnTerrain() { // spawnEntityAt(building1, randomPos, true, false); // } // } - private void spawnBuilding2() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); - - for (int i = 0; i < NUM_BUILDINGS; i++) { - GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); - Entity building2 = ObstacleFactory.createBuilding2(); - spawnEntityAt(building2, randomPos, true, false); - } - } +// private void spawnBuilding2() { +// GridPoint2 minPos = new GridPoint2(0, 0); +// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); +// +// for (int i = 0; i < NUM_BUILDINGS; i++) { +// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); +// Entity building2 = ObstacleFactory.createBuilding2(); +// spawnEntityAt(building2, randomPos, true, false); +// } +// } // private void spawnMountains() { // ArrayList fixedPositions = new ArrayList<>(); //Generating ArrayList @@ -291,15 +291,15 @@ private Entity spawnPlayer(GridPoint2 position) { // } // } - private Entity spawnBossKing1() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); - GridPoint2 randomPos - = new GridPoint2(0, 0); - Entity ghostKing = NPCFactory.createGhostKing(player); - spawnEntityAt(ghostKing, randomPos, true, true); - return ghostKing; - } +// private Entity spawnBossKing1() { +// GridPoint2 minPos = new GridPoint2(0, 0); +// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); +// GridPoint2 randomPos +// = new GridPoint2(0, 0); +// Entity ghostKing = NPCFactory.createGhostKing(player); +// spawnEntityAt(ghostKing, randomPos, true, true); +// return ghostKing; +// } /** * Spawns a projectile that only heads towards the enemies in its lane. @@ -374,34 +374,34 @@ private void spawnXenoGrunts() { } } - private Entity spawnGhostKing() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(0, 0); - GridPoint2 randomPos - = RandomUtils.random(minPos, maxPos); - // = new GridPoint2(26, 26); - Entity ghostKing = NPCFactory.createGhostKing(player); - spawnEntityAt(ghostKing, randomPos, true, true); - return ghostKing; - - } - - private Entity spawnBossKing2() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); +// private Entity spawnGhostKing() { +// GridPoint2 minPos = new GridPoint2(0, 0); +// GridPoint2 maxPos = terrain.getMapBounds(0).sub(0, 0); +// GridPoint2 randomPos +// = RandomUtils.random(minPos, maxPos); +// // = new GridPoint2(26, 26); +// Entity ghostKing = NPCFactory.createGhostKing(player); +// spawnEntityAt(ghostKing, randomPos, true, true); +// return ghostKing; +// +// } - for (int i = 0; i < NUM_BOSS; i++) { - int fixedX = terrain.getMapBounds(0).x - 1; // Rightmost x-coordinate - int randomY = MathUtils.random(0, maxPos.y); - GridPoint2 randomPos = new GridPoint2(fixedX, randomY); - bossKing2 = BossKingFactory.createBossKing2(player); - spawnEntityAt(bossKing2, - randomPos, - true, - false); - } - return bossKing2; - } +// private Entity spawnBossKing2() { +// GridPoint2 minPos = new GridPoint2(0, 0); +// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); +// +// for (int i = 0; i < NUM_BOSS; i++) { +// int fixedX = terrain.getMapBounds(0).x - 1; // Rightmost x-coordinate +// int randomY = MathUtils.random(0, maxPos.y); +// GridPoint2 randomPos = new GridPoint2(fixedX, randomY); +// bossKing2 = BossKingFactory.createBossKing2(player); +// spawnEntityAt(bossKing2, +// randomPos, +// true, +// false); +// } +// return bossKing2; +// } /** * Creates multiple projectiles that travel simultaneous. They all have same @@ -457,17 +457,17 @@ private void spawnWeaponTower() { } } - private void spawnTNTTower() { - GridPoint2 minPos = new GridPoint2(0, 0); - GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); - - for (int i = 0; i < NUM_WEAPON_TOWERS; i++) { - GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); - Entity weaponTower = TowerFactory.createTNTTower(); - spawnEntityAt(weaponTower, randomPos, true, true); - } - - } +// private void spawnTNTTower() { +// GridPoint2 minPos = new GridPoint2(0, 0); +// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); +// +// for (int i = 0; i < NUM_WEAPON_TOWERS; i++) { +// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); +// Entity weaponTower = TowerFactory.createTNTTower(); +// spawnEntityAt(weaponTower, randomPos, true, true); +// } +// +// } private void playMusic() { @@ -535,11 +535,11 @@ public void dispose() { // } // } // - private void spawnEngineer() { - - for (int i = 0; i < terrain.getMapBounds(0).x; i += 3) { - Entity engineer = EngineerFactory.createEngineer(); - spawnEntityAt(engineer, new GridPoint2(1, i), true, true); - } - } +// private void spawnEngineer() { +// +// for (int i = 0; i < terrain.getMapBounds(0).x; i += 3) { +// Entity engineer = EngineerFactory.createEngineer(); +// spawnEntityAt(engineer, new GridPoint2(1, i), true, true); +// } +// } } \ No newline at end of file diff --git a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java index b3196d8e3..668be5378 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java @@ -115,7 +115,7 @@ public void updateTowerState() { } case DIE -> { if (owner.getEntity().getComponent(AnimationRenderComponent.class).isFinished()) { - owner.getEntity().setFlagForDelete(true); +// owner.getEntity().setFlagForDelete(true); } } } From 37d7eac2e8109628930400bf235d2779a090195c Mon Sep 17 00:00:00 2001 From: Shivam Date: Mon, 11 Sep 2023 12:22:55 +1000 Subject: [PATCH 07/13] added burn effect to FireTower projectiles --- .../game/components/tasks/FireTowerCombatTask.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java index 3ac568f1b..c91117f24 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java @@ -3,6 +3,7 @@ import com.badlogic.gdx.math.Vector2; import com.csse3200.game.ai.tasks.DefaultTask; import com.csse3200.game.ai.tasks.PriorityTask; +import com.csse3200.game.components.ProjectileEffects; import com.csse3200.game.entities.Entity; import com.csse3200.game.entities.factories.ProjectileFactory; import com.csse3200.game.physics.PhysicsEngine; @@ -102,8 +103,11 @@ public void updateTowerState() { towerState = STATE.IDLE; } else { owner.getEntity().getEvents().trigger(ATTACK); - Entity newProjectile = ProjectileFactory.createFireBall(PhysicsLayer.NPC, - new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f)); +// Entity newProjectile = ProjectileFactory.createFireBall(PhysicsLayer.NPC, +// new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f)); + Entity newProjectile = ProjectileFactory.createEffectProjectile(PhysicsLayer.NPC, + new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f), + ProjectileEffects.BURN, false); newProjectile.setPosition((float) (owner.getEntity().getPosition().x + 0.25), (float) (owner.getEntity().getPosition().y + 0.25)); ServiceLocator.getEntityService().register(newProjectile); From 0bec9eb783d30b74daf133eddc7af1105792df93 Mon Sep 17 00:00:00 2001 From: Shivam Date: Mon, 11 Sep 2023 13:54:52 +1000 Subject: [PATCH 08/13] modified fire_tower_atlas.atlas to include death animation for fireTower --- .../images/towers/fire_tower_atlas.atlas | 114 +++++++++++++++--- .../assets/images/towers/fire_tower_atlas.png | Bin 6467 -> 14671 bytes .../components/tasks/StunTowerCombatTask.java | 2 +- 3 files changed, 100 insertions(+), 16 deletions(-) diff --git a/source/core/assets/images/towers/fire_tower_atlas.atlas b/source/core/assets/images/towers/fire_tower_atlas.atlas index 2f594a3b8..4c14d5e15 100644 --- a/source/core/assets/images/towers/fire_tower_atlas.atlas +++ b/source/core/assets/images/towers/fire_tower_atlas.atlas @@ -1,82 +1,166 @@ fire_tower_atlas.png -size: 1024, 64 +size: 2048, 64 format: RGBA8888 filter: Nearest, Nearest repeat: none attack rotate: false - xy: 122, 2 + xy: 242, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 index: 1 attack rotate: false - xy: 302, 2 + xy: 542, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 index: 3 attack rotate: false - xy: 422, 2 + xy: 782, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 index: 0 attack rotate: false - xy: 602, 2 + xy: 1082, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 index: 2 -idle +death rotate: false xy: 62, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 - index: 1 -idle + index: 6 +death rotate: false xy: 182, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 index: 3 -idle +death + rotate: false + xy: 302, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 8 +death rotate: false xy: 362, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 index: 0 -idle +prepAttack + rotate: false + xy: 362, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 1 +death rotate: false xy: 482, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 + index: 5 +death + rotate: false + xy: 662, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 11 +death + rotate: false + xy: 722, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 index: 2 -prepAttack +death rotate: false - xy: 2, 2 + xy: 842, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 7 +death + rotate: false + xy: 1022, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 4 +death + rotate: false + xy: 1142, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 9 +death + rotate: false + xy: 1202, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 10 +death + rotate: false + xy: 1262, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 1 +idle + rotate: false + xy: 122, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 1 +idle + rotate: false + xy: 422, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 3 +idle + rotate: false + xy: 602, 2 + size: 58, 58 + orig: 58, 58 + offset: 0, 0 + index: 0 +idle + rotate: false + xy: 902, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 index: 2 prepAttack rotate: false - xy: 242, 2 + xy: 2, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 - index: 1 + index: 2 prepAttack rotate: false - xy: 542, 2 + xy: 962, 2 size: 58, 58 orig: 58, 58 offset: 0, 0 diff --git a/source/core/assets/images/towers/fire_tower_atlas.png b/source/core/assets/images/towers/fire_tower_atlas.png index 71cae9af0d51df1bff0db6233db2df7fd8ab74a5..cae7db21798451731063d7f1bbd93ec0a3382989 100644 GIT binary patch literal 14671 zcmZvDc{r5s7xzf0B+6FS`nI4%DqGA*Dy3|xD9aQT*%|wc8KID^B4n8nMJk45kY(&b zOtOr97|Yma!x(0GAJzB!d#~$#|8coIp7WgZIiGXRea?N~QD!EFLc64Pfj}Ukt5+`G z0D*P@zk<&1;0J!ji6rZQK-v;lFY4b6uv^F&{^WKosF!l=;P&l@G6VLCY(FG|-R@C& z`{JSfU7ynzyTF7I3XEFS(NFm#y?!zKt9^F!k&H;=S2>T3e`ebC8K2Moa0Tl0K(lXO%n{bh<1ytRuMmr9L z_epKoz9Sj>)|THwKGoWTSm^cUe#yOy*m)>iEF7!6EGyUklZ$$2-9eHwW*K8=v+67rla$HIf&fnGHwtyt? zQ*N`x4WF%hFK`ba&}3HUolyuPiF2-+E#h@gtF(kt+BBEUu#Ckjc|svBI+5pA>6={h zBY$;K3>9dWI!J81b1YN_b8B6Fbs&G3+CMtfi-xY;tsoWGmgj@0#=qcRU$E&;RP$@d`@2^Ay@_O6W2VZf|rEJQTM}nS;s^ z0R06a`zNT}-TAv}fTH=?LxiBECEEgWq1JCZJCaCJoX`jp@=^7P((N6n1*A)T3)CnK zqZ#U4OK*>eEiz(^fTZ-coCE-`KTemLn(c8fZH3MP?4^TwME_u8a11jT`Vr45b1$V zcx}DUsf&gNS_^d%JG}NUfkOUx-TthuQYMeLZTBlEv4D2k;U0M;4 zw;f^A915m9f#+keUXENp^$zTIUH?E6{Z0w#uIE~woK|JoLe_@O-jYcoJ>eC5o)a{1 z<|wi*YqKP4y;CGz&sA6rLqRQ7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wz+!>l+=G?t9;9+D746zU(gXCek~`XPgkdVf{5 zYfX?|IJDrGN3`B>@+3HKHzsYqiot5nI@=)`^{DF&Dvo{YSHJs16_QOzs5pYp1B@;c zd&gLMM?W~Bawk~SGdOy!r-rL@655tK-J7!cO89-y!udA~`F5P4!STS+s1x%dqe=Ux~cNVN;9xe8ala+hS`&*)(emOq@ zaVha$uf&6L7XcxuDG@r9f+O4*F{uTU9-vWg8a5Eove(?y>&`=oeet diff --git a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java index 4a7b4ecd6..b766dd332 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java @@ -113,7 +113,7 @@ public void updateTowerState() { new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f), ProjectileEffects.STUN, false); newProjectile.setPosition((float) (owner.getEntity().getPosition().x + 0.25), - (float) (owner.getEntity().getPosition().y + 0.85)); + (float) (owner.getEntity().getPosition().y + 0.25)); ServiceLocator.getEntityService().register(newProjectile); } } From 1c05d7a0e42fbee29eddeb55fa1a7a72a9691173 Mon Sep 17 00:00:00 2001 From: Shivam Date: Mon, 11 Sep 2023 14:10:12 +1000 Subject: [PATCH 09/13] test commit --- .../csse3200/game/areas/ForestGameArea.java | 109 +++++++++--------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index 68f047fd8..c98b0fa83 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -8,6 +8,7 @@ import com.csse3200.game.components.ProjectileEffects; import com.csse3200.game.areas.terrain.TerrainFactory; import com.csse3200.game.areas.terrain.TerrainFactory.TerrainType; +import com.csse3200.game.components.TouchAttackComponent; import com.csse3200.game.components.player.PlayerStatsDisplay; import com.csse3200.game.entities.Entity; import com.csse3200.game.entities.factories.*; @@ -189,8 +190,8 @@ public void create() { // // Types of projectile // spawnAoeProjectile(new Vector2(0, 10), player, towardsMobs, new Vector2(2f, 2f), 1); -// spawnProjectile(new Vector2(0, 10), player, towardsMobs, new Vector2(2f, 2f)); -// spawnMultiProjectile(new Vector2(0, 10), player, towardsMobs, 20, new Vector2(2f, 2f), 7); + spawnProjectile(new Vector2(0, 10), PhysicsLayer.NPC, towardsMobs, new Vector2(2f, 2f)); + spawnMultiProjectile(new Vector2(0, 10), PhysicsLayer.NPC, towardsMobs, 20, new Vector2(2f, 2f), 7); spawnEffectProjectile(new Vector2(0, 10), PhysicsLayer.HUMANS, towardsMobs, new Vector2(2f, 2f), ProjectileEffects.BURN, true); spawnPierceFireBall(new Vector2(2, 3), PhysicsLayer.NPC, towardsMobs, new Vector2(2f, 2f)); spawnRicochetFireball(new Vector2(2, 4), PhysicsLayer.NPC, towardsMobs, new Vector2(2f, 2f)); @@ -201,11 +202,10 @@ public void create() { // spawnGhosts(); spawnWeaponTower(); // spawnIncome(); -// spawnScrap(); -// spawnTNTTower(); + spawnScrap(); + spawnTNTTower(); // spawnDroidTower(); - spawnGapScanners(); -// spawnIncome(); +// spawnGapScanners(); // bossKing1 = spawnBossKing1(); // bossKing2 = spawnBossKing2(); @@ -534,17 +534,17 @@ private void spawnWeaponTower() { } } -// private void spawnTNTTower() { -// GridPoint2 minPos = new GridPoint2(0, 0); -// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); -// -// for (int i = 0; i < NUM_WEAPON_TOWERS; i++) { -// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); -// Entity weaponTower = TowerFactory.createTNTTower(); -// spawnEntityAt(weaponTower, randomPos, true, true); -// } -// -// } + private void spawnTNTTower() { + GridPoint2 minPos = new GridPoint2(0, 0); + GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); + + for (int i = 0; i < NUM_WEAPON_TOWERS; i++) { + GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); + Entity weaponTower = TowerFactory.createTNTTower(); + spawnEntityAt(weaponTower, randomPos, true, true); + } + + } private void playMusic() { @@ -584,46 +584,46 @@ public void dispose() { this.unloadAssets(); } -// private void spawnScrap() { -// GridPoint2 minPos = new GridPoint2(0, 0); -// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); -// -// for (int i = 0; i < 5; i++) { -// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); -// Entity scrap = DropFactory.createScrapDrop(); -// spawnEntityAt(scrap, randomPos, true, false); -// } -// -// for (int i = 0; i < 5; i++) { -// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); -// Entity crystal = DropFactory.createCrystalDrop(); -// spawnEntityAt(crystal, randomPos, true, false); -// } -// } + private void spawnScrap() { + GridPoint2 minPos = new GridPoint2(0, 0); + GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); -// private void spawnIncome() { -// GridPoint2 minPos = new GridPoint2(0, 0); -// GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); + for (int i = 0; i < 5; i++) { + GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); + Entity scrap = DropFactory.createScrapDrop(); + spawnEntityAt(scrap, randomPos, true, false); + } + + for (int i = 0; i < 5; i++) { + GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); + Entity crystal = DropFactory.createCrystalDrop(); + spawnEntityAt(crystal, randomPos, true, false); + } + } + + private void spawnIncome() { + GridPoint2 minPos = new GridPoint2(0, 0); + GridPoint2 maxPos = terrain.getMapBounds(0).sub(2, 2); + + for (int i = 0; i < 50; i++) { + GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); + Entity towerfactory = TowerFactory.createIncomeTower(); + spawnEntityAt(towerfactory, randomPos, true, true); + } + } + + private void spawnEngineer() { + for (int i = 0; i < terrain.getMapBounds(0).x; i += 3) { + Entity engineer = EngineerFactory.createEngineer(); + spawnEntityAt(engineer, new GridPoint2(1, i), true, true); + } // -// for (int i = 0; i < 50; i++) { -// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos); -// Entity towerfactory = TowerFactory.createIncomeTower(); -// spawnEntityAt(towerfactory, randomPos, true, true); +// private void spawnGapScanners() { +// for (int i = 0; i < terrain.getMapBounds(0).y; i++) { +// Entity scanner = GapScannerFactory.createScanner(); +// spawnEntityAt(scanner, new GridPoint2(0, i), true, true); // } // } -// -// private void spawnEngineer() { -// -// for (int i = 0; i < terrain.getMapBounds(0).x; i += 3) { -// Entity engineer = EngineerFactory.createEngineer(); -// spawnEntityAt(engineer, new GridPoint2(1, i), true, true); - - private void spawnGapScanners() { - for (int i = 0; i < terrain.getMapBounds(0).y; i++) { - Entity scanner = GapScannerFactory.createScanner(); - spawnEntityAt(scanner, new GridPoint2(0, i), true, true); - } - } // private void gameTrackerStart() { // Entity endGameTracker = new Entity(); @@ -634,7 +634,7 @@ private void spawnGapScanners() { //// .getEvents().addListener("engineerKilled" , this::decrementCounter); // endGameTracker.create(); // } -// + // private void decrementCounter() { // this.endStateCounter -= 1; // logger.info("Engineer killed"); @@ -643,4 +643,5 @@ private void spawnGapScanners() { // this.dispose(); // } // } + } } \ No newline at end of file From 91738efb5c8c4743137036a6cccce56504e0da63 Mon Sep 17 00:00:00 2001 From: Shivam Date: Mon, 11 Sep 2023 14:59:14 +1000 Subject: [PATCH 10/13] fixing animations issues with fireTower --- .../com/csse3200/game/areas/ForestGameArea.java | 1 + .../components/tasks/FireTowerCombatTask.java | 15 ++++++++++++++- .../tower/FireTowerAnimationController.java | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index c98b0fa83..f505e81d0 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -296,6 +296,7 @@ private void spawnTerrain() { private Entity spawnPlayer() { Entity newPlayer = PlayerFactory.createPlayer(); spawnEntityAt(newPlayer, PLAYER_SPAWN, true, true); + newPlayer.addComponent(new TouchAttackComponent(PhysicsLayer.NPC)); return newPlayer; } diff --git a/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java index c91117f24..b440a5bba 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java @@ -3,12 +3,14 @@ import com.badlogic.gdx.math.Vector2; import com.csse3200.game.ai.tasks.DefaultTask; import com.csse3200.game.ai.tasks.PriorityTask; +import com.csse3200.game.components.CombatStatsComponent; import com.csse3200.game.components.ProjectileEffects; import com.csse3200.game.entities.Entity; import com.csse3200.game.entities.factories.ProjectileFactory; import com.csse3200.game.physics.PhysicsEngine; import com.csse3200.game.physics.PhysicsLayer; import com.csse3200.game.physics.raycast.RaycastHit; +import com.csse3200.game.rendering.AnimationRenderComponent; import com.csse3200.game.services.GameTime; import com.csse3200.game.services.ServiceLocator; @@ -24,6 +26,7 @@ public class FireTowerCombatTask extends DefaultTask implements PriorityTask { private static final String IDLE = "startIdle"; private static final String PREP_ATTACK = "startAttackPrep"; private static final String ATTACK = "startAttack"; + private static final String DEATH = "startDeath"; //Class attributes private final int priority; @@ -37,7 +40,7 @@ public class FireTowerCombatTask extends DefaultTask implements PriorityTask { private final RaycastHit hit = new RaycastHit(); private enum STATE { - IDLE, PREP_ATTACK, ATTACK + IDLE, PREP_ATTACK, ATTACK, DEATH } private STATE towerState = STATE.IDLE; @@ -81,6 +84,11 @@ public void update() { * finite state machine for the FireTower. Detects mobs in a straight line and changes the state of the tower. */ public void updateTowerState() { + if (owner.getEntity().getComponent(CombatStatsComponent.class).getHealth() <= 0 && towerState != STATE.DEATH) { + owner.getEntity().getEvents().trigger(DEATH); + towerState = STATE.DEATH; + return; + } switch (towerState) { case IDLE -> { if (isTargetVisible()) { @@ -113,6 +121,11 @@ public void updateTowerState() { ServiceLocator.getEntityService().register(newProjectile); } } + case DEATH -> { + if (owner.getEntity().getComponent(AnimationRenderComponent.class).isFinished()) { + owner.getEntity().setFlagForDelete(true); + } + } } } diff --git a/source/core/src/main/com/csse3200/game/components/tower/FireTowerAnimationController.java b/source/core/src/main/com/csse3200/game/components/tower/FireTowerAnimationController.java index 358d7a3a6..6753b6ba1 100644 --- a/source/core/src/main/com/csse3200/game/components/tower/FireTowerAnimationController.java +++ b/source/core/src/main/com/csse3200/game/components/tower/FireTowerAnimationController.java @@ -14,11 +14,13 @@ public class FireTowerAnimationController extends Component{ private static final String IDLE = "startIdle"; private static final String PREP_ATTACK = "startAttackPrep"; private static final String ATTACK = "startAttack"; + private static final String DEATH = "startDeath"; //animation name constants private static final String IDLE_ANIM = "idle"; private static final String PREP_ATTACK_ANIM = "prepAttack"; private static final String ATTACK_ANIM = "attack"; + private static final String DEATH_ANIM = "death"; //here we can add the sounds for the implemented animations AnimationRenderComponent animator; @@ -33,6 +35,7 @@ public void create() { entity.getEvents().addListener(IDLE, this::animateIdle); entity.getEvents().addListener(PREP_ATTACK, this::animatePrepAttack); entity.getEvents().addListener(ATTACK, this::animateAttack); + entity.getEvents().addListener(DEATH, this::animateDeath); } /** @@ -55,4 +58,8 @@ void animatePrepAttack() { void animateAttack() { animator.startAnimation(ATTACK_ANIM); } + + void animateDeath() { + animator.startAnimation(DEATH_ANIM); + } } From d7b8cc04982da13739d6cadc785897628df449e2 Mon Sep 17 00:00:00 2001 From: Shivam Date: Mon, 11 Sep 2023 16:22:11 +1000 Subject: [PATCH 11/13] Completed the death animations for FireTower and StunTower --- .../csse3200/game/components/tasks/StunTowerCombatTask.java | 2 +- .../com/csse3200/game/entities/factories/TowerFactory.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java index b766dd332..86cb4778d 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java @@ -119,7 +119,7 @@ public void updateTowerState() { } case DIE -> { if (owner.getEntity().getComponent(AnimationRenderComponent.class).isFinished()) { -// owner.getEntity().setFlagForDelete(true); + owner.getEntity().setFlagForDelete(true); } } } diff --git a/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java index 279ec3e4e..2fb77de38 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java @@ -78,10 +78,14 @@ public class TowerFactory { private static final float FIRE_TOWER_PREP_ATTACK_SPEED = 0.2f; private static final String FIRE_TOWER_ATTACK_ANIM = "attack"; private static final float FIRE_TOWER_ATTACK_SPEED = 0.25f; + private static final String FIRE_TOWER_DEATH_ANIM = "death"; + private static final float FIRE_TOWER_DEATH_SPEED = 0.12f; private static final String STUN_TOWER_IDLE_ANIM = "idle"; private static final float STUN_TOWER_IDLE_SPEED = 0.33f; private static final String STUN_TOWER_ATTACK_ANIM = "attack"; private static final float STUN_TOWER_ATTACK_SPEED = 0.12f; + private static final String STUN_TOWER_DEATH_ANIM = "death"; + private static final float STUN_TOWER_DEATH_SPEED = 0.12f; private static final int INCOME_INTERVAL = 300; private static final int INCOME_TASK_PRIORITY = 1; private static final String ECO_ATLAS = "images/economy/econ-tower.atlas"; @@ -263,6 +267,7 @@ public static Entity createFireTower() { animator.addAnimation(FIRE_TOWER_IDLE_ANIM, FIRE_TOWER_IDLE_SPEED, Animation.PlayMode.LOOP); animator.addAnimation(FIRE_TOWER_PREP_ATTACK_ANIM, FIRE_TOWER_PREP_ATTACK_SPEED, Animation.PlayMode.NORMAL); animator.addAnimation(FIRE_TOWER_ATTACK_ANIM, FIRE_TOWER_ATTACK_SPEED, Animation.PlayMode.LOOP); + animator.addAnimation(FIRE_TOWER_DEATH_ANIM, FIRE_TOWER_DEATH_SPEED, Animation.PlayMode.NORMAL); fireTower .addComponent(new CombatStatsComponent(config.health, config.baseAttack)) @@ -291,6 +296,7 @@ public static Entity createStunTower() { .getAsset(STUN_TOWER_ATLAS, TextureAtlas.class)); animator.addAnimation(STUN_TOWER_IDLE_ANIM, STUN_TOWER_IDLE_SPEED, Animation.PlayMode.LOOP); animator.addAnimation(STUN_TOWER_ATTACK_ANIM, STUN_TOWER_ATTACK_SPEED, Animation.PlayMode.LOOP); + animator.addAnimation(STUN_TOWER_DEATH_ANIM, STUN_TOWER_DEATH_SPEED, Animation.PlayMode.NORMAL); stunTower .addComponent(new CombatStatsComponent(config.health, config.baseAttack)) From bee16f6fe97035b447a7352b4b87f965cfe57e13 Mon Sep 17 00:00:00 2001 From: Shivam Date: Mon, 11 Sep 2023 16:48:23 +1000 Subject: [PATCH 12/13] fixed the animation bug --- .../src/main/com/csse3200/game/areas/ForestGameArea.java | 2 +- .../game/components/tasks/FireTowerCombatTask.java | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index f505e81d0..97dd1cc1c 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -188,7 +188,7 @@ public void create() { playMusic(); -// // Types of projectile + // Types of projectile // spawnAoeProjectile(new Vector2(0, 10), player, towardsMobs, new Vector2(2f, 2f), 1); spawnProjectile(new Vector2(0, 10), PhysicsLayer.NPC, towardsMobs, new Vector2(2f, 2f)); spawnMultiProjectile(new Vector2(0, 10), PhysicsLayer.NPC, towardsMobs, 20, new Vector2(2f, 2f), 7); diff --git a/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java index b440a5bba..7ae2c2813 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/FireTowerCombatTask.java @@ -111,11 +111,8 @@ public void updateTowerState() { towerState = STATE.IDLE; } else { owner.getEntity().getEvents().trigger(ATTACK); -// Entity newProjectile = ProjectileFactory.createFireBall(PhysicsLayer.NPC, -// new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f)); - Entity newProjectile = ProjectileFactory.createEffectProjectile(PhysicsLayer.NPC, - new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f), - ProjectileEffects.BURN, false); + Entity newProjectile = ProjectileFactory.createFireBall(PhysicsLayer.NPC, + new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f)); newProjectile.setPosition((float) (owner.getEntity().getPosition().x + 0.25), (float) (owner.getEntity().getPosition().y + 0.25)); ServiceLocator.getEntityService().register(newProjectile); From e9e0d313bd2eef6f17356781632d1328495369fa Mon Sep 17 00:00:00 2001 From: Shivam Date: Mon, 11 Sep 2023 23:44:57 +1000 Subject: [PATCH 13/13] Finalised all tests and fixed animation bug in stunTower --- .../entities/factories/TowerFactoryTest.java | 50 +++++++++++++++++-- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java b/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java index 81596fca0..1ab5d51cc 100644 --- a/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java +++ b/source/core/src/test/com/csse3200/game/entities/factories/TowerFactoryTest.java @@ -41,17 +41,23 @@ public class TowerFactoryTest { private Entity wallTower; private Entity stunTower; private Entity fireTower; + private Entity tntTower; + private Entity droidTower; private String[] texture = { "images/towers/turret_deployed.png", "images/towers/turret01.png", "images/towers/wallTower.png", "images/towers/fire_tower_atlas.png", - "images/towers/stun_tower.png" + "images/towers/stun_tower.png", + "images/towers/DroidTower.png", + "images/towers/TNTTower.png" }; private String[] atlas = { "images/towers/turret01.atlas", "images/towers/stun_tower.atlas", - "images/towers/fire_tower_atlas.atlas" + "images/towers/fire_tower_atlas.atlas", + "images/towers/DroidTower.atlas", + "images/towers/TNTTower.atlas" }; private static final String[] sounds = { "sounds/towers/gun_shot_trimmed.mp3", @@ -81,6 +87,8 @@ public void setUp() { wallTower = TowerFactory.createWallTower(); fireTower = TowerFactory.createFireTower(); stunTower = TowerFactory.createFireTower(); + tntTower = TowerFactory.createTNTTower(); + droidTower = TowerFactory.createDroidTower(); } @Test @@ -90,7 +98,9 @@ public void testCreateBaseTowerNotNull() { assertNotNull(weaponTower, "Weaponry tower should not be null"); assertNotNull(wallTower, "Wall tower should not be null"); assertNotNull(stunTower, "Stun tower must not be null"); - assertNotNull(fireTower, "Stun tower must not be null"); + assertNotNull(fireTower, "Fire tower must not be null"); + assertNotNull(tntTower, "TNT tower must not be null"); + assertNotNull(droidTower, "Droid tower must not be null"); } @Test @@ -105,6 +115,10 @@ public void testCreateBaseTowerHasColliderComponent() { "Stun Tower should have ColliderComponent"); assertNotNull(fireTower.getComponent(ColliderComponent.class), "Fire tower should have ColliderComponent"); + assertNotNull(tntTower.getComponent(ColliderComponent.class), + "TNT tower should have ColliderComponent"); + assertNotNull(droidTower.getComponent(ColliderComponent.class), + "Droid tower should have ColliderComponent"); } @Test @@ -119,6 +133,10 @@ public void testCreateBaseTowerHasHitboxComponent() { "Stun tower should have HitboxComponent"); assertNotNull(fireTower.getComponent(HitboxComponent.class), "Fire tower should have HitboxComponent"); + assertNotNull(tntTower.getComponent(HitboxComponent.class), + "TNT tower should have HitboxComponent"); + assertNotNull(droidTower.getComponent(HitboxComponent.class), + "Droid tower should have HitboxComponent"); } @Test @@ -133,6 +151,10 @@ public void testCreateBaseTowerHasPhysicsComponent() { "Stun tower should have PhysicsComponent"); assertNotNull(fireTower.getComponent(PhysicsComponent.class), "Fire tower should have PhysicsComponent"); + assertNotNull(tntTower.getComponent(PhysicsComponent.class), + "TNT tower should have PhysicsComponent"); + assertNotNull(droidTower.getComponent(PhysicsComponent.class), + "Droid tower should have PhysicsComponent"); } @Test @@ -142,6 +164,8 @@ public void testCreateBaseTowerPhysicsComponentStaticBody() { PhysicsComponent physicsComponent2 = wallTower.getComponent(PhysicsComponent.class); PhysicsComponent physicsComponent3 = stunTower.getComponent(PhysicsComponent.class); PhysicsComponent physicsComponent4 = fireTower.getComponent(PhysicsComponent.class); + PhysicsComponent physicsComponent5 = tntTower.getComponent(PhysicsComponent.class); + PhysicsComponent physicsComponent6 = droidTower.getComponent(PhysicsComponent.class); assertTrue(physicsComponent.getBody().getType() == BodyType.StaticBody, "PhysicsComponent should be of type StaticBody"); @@ -153,6 +177,10 @@ public void testCreateBaseTowerPhysicsComponentStaticBody() { "StunTower's PhysicsComponent should be of type StaticBody"); assertTrue(physicsComponent4.getBody().getType() == BodyType.StaticBody, "FireTower's PhysicsComponent should be of type StaticBody"); + assertTrue(physicsComponent5.getBody().getType() == BodyType.StaticBody, + "TNT tower's PhysicsComponent should be of type StaticBody"); + assertTrue(physicsComponent6.getBody().getType() == BodyType.StaticBody, + "Droid Tower's PhysicsComponent should be of type StaticBody"); } @Test @@ -174,8 +202,20 @@ public void testWeaponTowerCombatStatsComponentAndCostComponent() { "Stun Tower health must be 10"); assertEquals(10, stunTower.getComponent(CombatStatsComponent.class).getBaseAttack(), "Stun Tower base attack must be 10"); - assertEquals(10, fireTower.getComponent(CostComponent.class).getCost(), + assertEquals(10, stunTower.getComponent(CostComponent.class).getCost(), "Stun Tower cost must 10"); + assertEquals(10, tntTower.getComponent(CombatStatsComponent.class).getHealth(), + "TNT Tower health must be 10"); + assertEquals(5, tntTower.getComponent(CombatStatsComponent.class).getBaseAttack(), + "TNT Tower base attack must be 5"); + assertEquals(1, tntTower.getComponent(CostComponent.class).getCost(), + "TNT Tower cost must 1"); + assertEquals(50, droidTower.getComponent(CombatStatsComponent.class).getHealth(), + "TNT Tower health must be 50"); + assertEquals(5, droidTower.getComponent(CombatStatsComponent.class).getBaseAttack(), + "Droid Tower base attack must be 5"); + assertEquals(1, droidTower.getComponent(CostComponent.class).getCost(), + "Droid Tower cost must 1"); } @Test @@ -195,6 +235,8 @@ public void weaponTowerHasAnimationComponent() { assertNotNull(weaponTower.getComponent(AnimationRenderComponent.class)); assertNotNull(stunTower.getComponent(AnimationRenderComponent.class)); assertNotNull(fireTower.getComponent(AnimationRenderComponent.class)); + assertNotNull(tntTower.getComponent(AnimationRenderComponent.class)); + assertNotNull(droidTower.getComponent(AnimationRenderComponent.class)); } @Test