Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team 2 engineers #125

Merged
merged 22 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4390f55
cleaning up
The-AhmadAA Sep 10, 2023
38fcf45
merging Collab-end-game-state into Team-2--Engineers
The-AhmadAA Sep 11, 2023
61dbfde
Added test class XenoAnimationTest to test animation triggers.
BlairCannon97 Sep 11, 2023
ba0396f
Cleaned up redundant tests in XenoAnimationController
BlairCannon97 Sep 12, 2023
5f7c4f4
Added an additional test testCreateXenoGruntHasPhysicsMovementCompone…
BlairCannon97 Sep 12, 2023
8f466e1
fixed display not updating at start if engineerCount is not default
The-AhmadAA Sep 12, 2023
4cb118b
added upper bound to engineerCount (1000)
The-AhmadAA Sep 12, 2023
fe7dc16
Added random melee animation triggers in XenoAnimationController.
BlairCannon97 Sep 12, 2023
2e7dcc5
restored forestGameArea after testing
The-AhmadAA Sep 12, 2023
91ec9a3
Merge remote-tracking branch 'origin/main-recovery' into Team-4---Gen…
meganroxburgh Sep 12, 2023
b66b7a0
Merge pull request #147 from UQcsse3200/Team-4---General-Mobs
The-AhmadAA Sep 12, 2023
7b3146f
Merge pull request #146 from UQcsse3200/Team-3-maps-main
The-AhmadAA Sep 12, 2023
ca941e9
merging main into Team-2--Engineers in preparation for PR
The-AhmadAA Sep 12, 2023
2242ac7
uncommented code to allow engineers to spawn
The-AhmadAA Sep 12, 2023
75a1cc3
Added the spawnDroidTower() after somebody deleted it
Mohamad11Dab Sep 12, 2023
97b7b59
Merge branch 'main' into Team-4---General-Mobs
BlairCannon97 Sep 12, 2023
f90b2e0
Merge pull request #155 from UQcsse3200/Mohamad-Tower
Hasakev Sep 12, 2023
477f2d6
Merge pull request #156 from UQcsse3200/Team6
rahulsagar500 Sep 12, 2023
58c51ff
Revert "Team6"
Jonoym Sep 12, 2023
d3a362c
Merge pull request #159 from UQcsse3200/revert-156-Team6
Jonoym Sep 12, 2023
b0bd5ed
Merge pull request #157 from UQcsse3200/Team-4---General-Mobs
meganroxburgh Sep 12, 2023
71e46d7
Merge branch 'main' into Team-2--Engineers
The-AhmadAA Sep 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
Binary file removed source/core/assets/images/background.jpg
Binary file not shown.
Binary file removed source/core/assets/images/background1.png
Binary file not shown.
69 changes: 20 additions & 49 deletions source/core/src/main/com/csse3200/game/areas/ForestGameArea.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,13 @@
public class ForestGameArea extends GameArea {
private static final Logger logger = LoggerFactory.getLogger(ForestGameArea.class);
private static final int NUM_BUILDINGS = 4;


// private static final int NUM_TREES = 0;

private static final int NUM_GHOSTS = 0;
private static final int NUM_GRUNTS = 5;
private static final int NUM_BOSS = 4;


private Timer bossSpawnTimer;
// 1 minute in millisecondsz



private int bossSpawnInterval = 10000; // 1 minute in milliseconds

private static final int NUM_WEAPON_TOWERS = 3;
private static final GridPoint2 PLAYER_SPAWN = new GridPoint2(0, 0);
// Temporary spawn point for testing
Expand Down Expand Up @@ -182,9 +173,6 @@ public void create() {
loadAssets();
displayUI();
spawnTerrain();
// spawnBuilding1();
// spawnBuilding2();
// spawnMountains();

// Set up infrastructure for end game tracking
player = spawnPlayer();
Expand All @@ -201,17 +189,14 @@ public void create() {
spawnRicochetFireball(new Vector2(2, 4), PhysicsLayer.NPC, towardsMobs, new Vector2(2f, 2f));
spawnSplitFireWorksFireBall(new Vector2(2, 5), PhysicsLayer.NPC, towardsMobs, new Vector2(2f, 2f), 12);
spawnEffectProjectile(new Vector2(2, 6), PhysicsLayer.NPC, towardsMobs, new Vector2(2f, 2f), ProjectileEffects.SLOW, false);
// spawnProjectileTest(new Vector2(0, 8), PhysicsLayer.NPC, towardsMobs, new Vector2(2f, 2f));
spawnXenoGrunts();
// spawnGhosts();
spawnWeaponTower();
// spawnIncome();
spawnScrap();
spawnTNTTower();
// spawnDroidTower();
// spawnGapScanners();
// bossKing1 = spawnBossKing1();
// bossKing2 = spawnBossKing2();

spawnGapScanners();
spawnDroidTower();

bossKing2 = spawnBossKing2();
}
Expand Down Expand Up @@ -576,6 +561,17 @@ 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() {
Expand Down Expand Up @@ -654,37 +650,12 @@ private void spawnEngineer() {
* Creates the scanners (one per lane) that detect absence of towers and presence of mobs,
* and trigger engineer spawning
*/
// 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);
// }
// }
// GridPoint2 minPos = new GridPoint2(0, 0);
// GridPoint2 maxPos = new GridPoint2(5, terrain.getMapBounds(0).sub(2, 2).y);
// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos);
//
// Entity engineer = EngineerFactory.createEngineer();
// spawnEntityAt(engineer, 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 gameTrackerStart() {
// Entity endGameTracker = new Entity();
//
// endGameTracker
// .addComponent(new CombatStatsComponent(2, 0))
// .addComponent(new PlayerStatsDisplay());
//// .getEvents().addListener("engineerKilled" , this::decrementCounter);
// endGameTracker.create();
// }

// private void decrementCounter() {
// this.endStateCounter -= 1;
// logger.info("Engineer killed");
// if (endStateCounter <= 0) {
// // we've reached the end, game over
// this.dispose();
// }
// }
}
Loading