private bool ifThereIsAI(BattleHex evaluatedHex) { bool AIPosfalse = true; //if the hex is occupied by an object of type Hero, but without an Enemy component if (evaluatedHex.GetComponentInChildren <Hero>() != null && evaluatedHex.GetComponentInChildren <Enemy>() == null) { AIPosfalse = false;//then we allow the troll to go through this hex } return(AIPosfalse); }
private bool ifThereIsAI(BattleHex evaluatedHex) { bool AIPosfalse = true; // si el hex está ocupado por un objeto de tipo Hero, pero sin un componente Enemy if (evaluatedHex.GetComponentInChildren <Hero>() != null && evaluatedHex.GetComponentInChildren <Enemy>() == null) { AIPosfalse = false;// luego permitimos que el troll pase por este maleficio } return(AIPosfalse); }
// comprueba si el hexágono inicial está ocupado por la escuadra de un jugador private bool ifThereIsPlayersRegiment(BattleHex evaluatedHex) { bool AIPosfalse = true; // si el objeto de tipo Hero no contiene una clase de tipo Enemy if (evaluatedHex.GetComponentInChildren <Hero>() != null && evaluatedHex.GetComponentInChildren <Enemy>() == null) { evaluatedHex.DefineMeAsPotencialTarget(); AIPosfalse = false; } return(AIPosfalse); }
//checks if the initial hex is occupied by a player’s squad private bool ifThereIsPlayersRegiment(BattleHex evaluatedHex) { bool AIPosfalse = true; //if the object of type Hero does not contain a class of Enemy type if (evaluatedHex.GetComponentInChildren <Hero>() != null && evaluatedHex.GetComponentInChildren <Enemy>() == null) { evaluatedHex.DefineMeAsPotencialTarget(); AIPosfalse = false; } return(AIPosfalse); }
public bool EvaluateHex(BattleHex evaluatedHex) { //check whether the hero is on the hex or not and //whether this object contains the Enemy component if (BattleController.currentAtacker.GetComponent <Enemy>() == null) { return(evaluatedHex.GetComponentInChildren <Enemy>() != null); } else { return(evaluatedHex.GetComponentInChildren <Hero>() != null && evaluatedHex.GetComponentInChildren <Enemy>() == null); } }
public bool EvaluateHex(BattleHex evaluatedHex) { // comprobar si el héroe está en el hexagono o no y // si este objeto contiene el componente Enemy if (BattleController.currentAtacker.GetComponent <Enemy>() == null) { return(evaluatedHex.GetComponentInChildren <Enemy>() != null); } else { return(evaluatedHex.GetComponentInChildren <Hero>() != null && evaluatedHex.GetComponentInChildren <Enemy>() == null); } }
public bool EvaluateHex(BattleHex evaluatedHex) { return(evaluatedHex.battleHexState == HexState.active && !evaluatedHex.isStartingHex && !evaluatedHex.isNeighboringHex && evaluatedHex.GetComponentInChildren <Enemy>() == null); }
public bool EvaluateHex(BattleHex evaluatedHex) { return(evaluatedHex.battleHexState == HexState.active && !evaluatedHex.isStartingHex && !evaluatedHex.isIncluded && evaluatedHex.AvailableToGround() && evaluatedHex.GetComponentInChildren <Enemy>() == null); }