bump
This commit is contained in:
parent
47caa9867e
commit
db2748b12f
2 changed files with 8 additions and 6 deletions
|
@ -90,15 +90,15 @@ public class InputManagerScript : MonoBehaviour {
|
||||||
unitSelected = true;
|
unitSelected = true;
|
||||||
showActions = true;
|
showActions = true;
|
||||||
GameObject canv = GameObject.Find ("Canvas");
|
GameObject canv = GameObject.Find ("Canvas");
|
||||||
images [0] = Instantiate (imageMove);
|
images [0] = Instantiate (imageAttack);
|
||||||
images[0].transform.SetParent (canv.transform, false);
|
images[0].transform.SetParent (canv.transform, false);
|
||||||
images [0].transform.position = new Vector3 (20, 0, 20);
|
images [0].transform.position = new Vector3 (50, 0, 50);
|
||||||
images[1] = Instantiate (imageAttack);
|
images[1] = Instantiate (imageMove);
|
||||||
images[1].transform.SetParent (canv.transform, false);
|
images[1].transform.SetParent (canv.transform, false);
|
||||||
images [1].transform.position = new Vector3 (40, 0, 20);
|
images [1].transform.position = new Vector3 (100, 0, 50);
|
||||||
images[2] = Instantiate (imageEndTurn);
|
images[2] = Instantiate (imageEndTurn);
|
||||||
images[2].transform.SetParent (canv.transform, false);
|
images[2].transform.SetParent (canv.transform, false);
|
||||||
images [2].transform.position = new Vector3 (60, 0, 20);
|
images [2].transform.position = new Vector3 (150, 0, 50);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
changeCursorColor (Color.red);
|
changeCursorColor (Color.red);
|
||||||
|
|
|
@ -79,11 +79,12 @@ public class TurnManagerScript : MonoBehaviour {
|
||||||
|
|
||||||
public void moveTo(GameObject go, int i, int j) {
|
public void moveTo(GameObject go, int i, int j) {
|
||||||
UnitBehaviour ub = go.GetComponent<UnitBehaviour> ();
|
UnitBehaviour ub = go.GetComponent<UnitBehaviour> ();
|
||||||
|
ub.moveAct ();
|
||||||
int pi = (int)go.transform.position.z;
|
int pi = (int)go.transform.position.z;
|
||||||
int pj = (int)go.transform.position.x;
|
int pj = (int)go.transform.position.x;
|
||||||
List<position> movement = getPathBFS (pi, pj, i, j);
|
List<position> movement = getPathBFS (pi, pj, i, j);
|
||||||
//TODO: MOVEMENT
|
//TODO: MOVEMENT
|
||||||
ub.moveAct ();
|
|
||||||
if (ub.remainingActions == 0)
|
if (ub.remainingActions == 0)
|
||||||
actualNumFinishedChars += 1;
|
actualNumFinishedChars += 1;
|
||||||
//Move the unit
|
//Move the unit
|
||||||
|
@ -91,6 +92,7 @@ public class TurnManagerScript : MonoBehaviour {
|
||||||
//Update matrices
|
//Update matrices
|
||||||
unitMap.SetValue(null, pi, pj);
|
unitMap.SetValue(null, pi, pj);
|
||||||
unitMap.SetValue(go, i, j);
|
unitMap.SetValue(go, i, j);
|
||||||
|
ub.stopMoveAct ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void attackTo(GameObject go, int i, int j) {
|
public void attackTo(GameObject go, int i, int j) {
|
||||||
|
|
Loading…
Reference in a new issue