From d5bded151e22b0721cffefc803b52836b59faec3 Mon Sep 17 00:00:00 2001
From: Pan Hu
Date: Sun, 13 Jan 2019 22:46:08 +1300
Subject: [PATCH] new commit
---
core/.gitignore | 1 -
core/grid.java | 1 +
core/mainThread.java | 2 +-
core/polygon3D.java | 4 +-
enemyAI/defenseManagerAI.java | 2 +
enemyAI/enemyCommander.java | 2 +-
enemyAI/mapAwarenessAI.java | 77 +++++++++++++++++++++++++++++++++++
enemyAI/unitProductionAI.java | 4 +-
8 files changed, 86 insertions(+), 7 deletions(-)
diff --git a/core/.gitignore b/core/.gitignore
index 1c87580..8a42e92 100644
--- a/core/.gitignore
+++ b/core/.gitignore
@@ -18,4 +18,3 @@
/textRenderer.class
/texture.class
/vector.class
-/mainThread$MathOperation.class
diff --git a/core/grid.java b/core/grid.java
index 100506c..91b7a68 100644
--- a/core/grid.java
+++ b/core/grid.java
@@ -54,6 +54,7 @@ public class grid {
}
}
+
}
diff --git a/core/mainThread.java b/core/mainThread.java
index c86c258..83b31a4 100644
--- a/core/mainThread.java
+++ b/core/mainThread.java
@@ -496,7 +496,7 @@ public class mainThread extends JFrame implements KeyListener, ActionListener, M
while(System.currentTimeMillis()-lastDraw mainPlayerForceSize) {
+ mainPlayerForceSize = playerForceSize[i];
+ mainPlayerForceLocation.set(playerForceLocations[i].x/mainPlayerForceSize,0,playerForceLocations[i].z/mainPlayerForceSize);
+ mainPlayerForceDirection.set(playerForceDirections[i].x/mainPlayerForceSize, 0, playerForceDirections[i].z/mainPlayerForceSize);
+ }
+ }
+
+ System.out.println(mainPlayerForceSize + " " + mainPlayerForceLocation + " " + mainPlayerForceDirection);
+ }
}
diff --git a/enemyAI/unitProductionAI.java b/enemyAI/unitProductionAI.java
index b9e29e1..0072e4e 100644
--- a/enemyAI/unitProductionAI.java
+++ b/enemyAI/unitProductionAI.java
@@ -73,7 +73,7 @@ public class unitProductionAI {
public void processAI(){
frameAI++;
- //set the rally point to near the construction yard which is closest to the player's starting position
+ //set the rally point to near the construction yard which is closest to the AI player's starting position
float x = 0;
float z = 999999;
@@ -81,7 +81,7 @@ public class unitProductionAI {
for(int i = 0; i < mainThread.theAssetManager.constructionYards.length; i++){
if(mainThread.theAssetManager.constructionYards[i] != null && mainThread.theAssetManager.constructionYards[i].currentHP > 0 && mainThread.theAssetManager.constructionYards[i].teamNo != 0){
index = i;
- if(mainThread.theAssetManager.constructionYards[i].centre.z < z && mainThread.theAssetManager.constructionYards[i].centre.z > 5 && mainThread.theAssetManager.constructionYards[i].centre.x > 5){
+ if(mainThread.theAssetManager.constructionYards[i].centre.z < z && mainThread.theAssetManager.constructionYards[i].centre.z > 7 && mainThread.theAssetManager.constructionYards[i].centre.x > 7){
x = mainThread.theAssetManager.constructionYards[i].centre.x;
z = mainThread.theAssetManager.constructionYards[i].centre.z;
}