private void RemoveHero(Hero hero) //removes the selected hero { BattleHex parentHex = hero.GetComponentInParent <BattleHex>(); //to access the MakeMeDeploymentPosition method parentHex.MakeMeDeploymentPosition(); //returns the hex to the starting position Destroy(hero.gameObject); //removes the hero }
private void RemoveHero(Hero hero) //removes the selected hero { BattleHex parentHex = hero.GetComponentInParent <BattleHex>(); // para acceder al método MakeMeDeploymentPosition parentHex.MakeMeDeploymentPosition(); // devuelve el hex a la posición inicial Destroy(hero.gameObject); // elimina al héroe }
private void DestroyMe(CharAttributes SOHero) // destruye este objeto { if (SOHero == heroData) // compara la elección del jugador con el héroe { BattleHex parentHex = GetComponentInParent <BattleHex>(); parentHex.MakeMeDeploymentPosition(); startBTN.ControlStartBTN();/// comprueba si es hora de ocultar el botón Inicio Destroy(gameObject); } }
private void DestroyMe(CharAttributes SOHero) //destroys this object { if (SOHero == heroData) // compares the player’s choice with the hero { BattleHex parentHex = GetComponentInParent <BattleHex>(); parentHex.MakeMeDeploymentPosition(); startBTN.ControlStartBTN();//checks if it's time to hide the Start button Destroy(gameObject); } }