示例#1
0
    public void LaunchDiceAnimation()
    {
        this.CallUpdateUIShowDices();

        for (int i = 0; i < this.L_dices.Count; i++)
        {
            //print (this.summonerName + " : Dés " + i + " est " + this.L_dices[i].isBlocked);

            if (this.L_dices [i].isBlocked == false)
            {
                this.L_dices [i].isDicing      = true;
                this.L_dices [i].diceCoroutine = StartCoroutine(this.L_dices [i].DiceAnimation());
            }
            else
            {
                this.charactersInfosPanel.GetComponent <CharacterInfosPanel> ().ShowBlockedDice(i);
            }
        }
        for (int i = 0; i < this.L_supports.Count; i++)
        {
            for (int j = 0; j < this.L_supports [i].GetComponent <Support> ().L_dices.Count; j++)
            {
                Support supportScript = this.L_supports [i].GetComponent <Support> ();
                supportScript.CallUpdateUIShowDices();

                //print (supportScript.supportName + " : Dés " + j + " est " + supportScript.L_dices [j].isBlocked);

                if (supportScript.L_dices [j].isBlocked == false)
                {
                    supportScript.L_dices [j].isDicing      = true;
                    supportScript.L_dices [j].diceCoroutine = StartCoroutine(supportScript.L_dices [j].DiceAnimation());
                }
                else
                {
                    supportScript.charactersInfosPanel.GetComponent <CharacterInfosPanel> ().ShowBlockedDice(j);
                }
            }
        }
        StartCoroutine(this.StopDiceAnimation());
    }