Exemplo n.º 1
0
 // Start is called before the first frame update
 public BattleControl(NPC enemy, Trainer t, BattleCanvasScript b)
 {
     nPC          = enemy;
     pokemonList  = enemy.getPokemon();
     battleCanvas = b;
     this.t       = t;
 }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     bag.SetActive(false);
     menu.SetActive(false);
     inBattle     = false;
     iterations   = 1;
     battleCanvas = battle.GetComponent <BattleCanvasScript>();
 }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     //  bag = GlobalControl.Instance.bag;
     cursor = 0;
     picture.GetComponent <Image>();
     bcScript = battleCanvas.GetComponent <BattleCanvasScript>();
     pcScript = pokemonCanvas.GetComponent <PokemonCanvasScript>();
 }
Exemplo n.º 4
0
    public void printNewPoke()
    {
        BattleCanvasScript bcScript = battleCanvas.GetComponent <BattleCanvasScript>();

        Pokemon temp = pokemon[pok2];

        pokemon[pok2] = pokemon[pok1];
        pokemon[pok1] = temp;
        bcScript.changeTitleText("Lets Go " + pokemon[0].name + "!", bcScript.time);
    }
Exemplo n.º 5
0
    public void swapPokemon()
    {
        pok1--;
        pok2--;

        int movedPoke   = pok1;
        int desiredPoke = pok2;

        if (battleCanvas.activeSelf)
        {
            BattleCanvasScript bcScript = battleCanvas.GetComponent <BattleCanvasScript>();
            bcScript.buttonTransparent();
            if (movedPoke == 0 || desiredPoke == 0)
            {
                bcScript.changeTitleText("Good Stuff " + pokemon[0].name + "!", bcScript.time);
                Invoke("printNewPoke", bcScript.time);
                Invoke("enemyTurnFight", bcScript.time * 2);
            }
            else
            {
                Pokemon temp = pokemon[pok2];
                pokemon[pok2] = pokemon[pok1];
                pokemon[pok1] = temp;

                bcScript.changeTitleText("You swapped " + pokemon[movedPoke].name + " with " + pokemon[desiredPoke].name + "!", bcScript.time);

                Invoke("enemyTurnFight", bcScript.time);
            }
        }
        else
        {
            Pokemon temp = pokemon[pok2];
            pokemon[pok2] = pokemon[pok1];
            pokemon[pok1] = temp;
        }

        pokemonCanvas.SetActive(false);
        description.text = "";
    }
Exemplo n.º 6
0
    public void enemyTurnFight()
    {
        BattleCanvasScript bcScript = battleCanvas.GetComponent <BattleCanvasScript>();

        bcScript.enemyTurnFight();
    }
Exemplo n.º 7
0
    public void buttonVisible()
    {
        BattleCanvasScript bcScript = battleCanvas.GetComponent <BattleCanvasScript>();

        bcScript.buttonVisible();
    }
 // Use this for initialization
 void Awake()
 {
     Instance = this;
 }
Exemplo n.º 9
0
 public BattleControl(Pokemon p, Trainer t, BattleCanvasScript b)
 {
     pokemonList.Add(p);
     this.t       = t;
     battleCanvas = b;
 }