Exemplo n.º 1
0
 public void WinFight()
 {
     currentFight.gameObject.SetActive(false);
     option1.rule = ennemies[currentEnnemy].option1;
     option1.GetComponent <CardRenderer>().UpdateLayout();
     option2.rule = ennemies[currentEnnemy].option2;
     option2.GetComponent <CardRenderer>().UpdateLayout();
     wonScreen.gameObject.SetActive(true);
     wonScreen.Play();
     BattleEnded();
 }
Exemplo n.º 2
0
    public void Start()
    {
        fight.gameObject.SetActive(false);
        introductionScreen.gameObject.SetActive(true);
        looseScreen.gameObject.SetActive(false);
        wonScreen.gameObject.SetActive(false);

        currentEnnemy = 0;
        if (skipIntro)
        {
            LaunchFight(introductionScreen);
        }
        else
        {
            introductionScreen.Play();
        }
    }
Exemplo n.º 3
0
    public void LoseFight()
    {
        currentFight.gameObject.SetActive(false);

        int option1idx = Random.Range(0, playerDeck.Count - 1);

        loseOption1.rule = playerDeck[option1idx];
        playerDeck.RemoveAt(option1idx);
        int option2idx = Random.Range(0, playerDeck.Count - 1);

        loseOption2.rule = playerDeck[option2idx];
        playerDeck.RemoveAt(option2idx);

        loseOption1.GetComponent <CardRenderer>().UpdateLayout();
        loseOption2.GetComponent <CardRenderer>().UpdateLayout();

        looseScreen.gameObject.SetActive(true);
        looseScreen.Play();
        BattleEnded();
    }