// 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); }