Beispiel #1
0
    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
    }
Beispiel #2
0
    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
    }
Beispiel #3
0
 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);
     }
 }