Ejemplo n.º 1
0
    string RulesInterface.action()
    {
        string[] possibleAttacks = AnimationStates.GetAirAttacks();
        int      randomAttack    = Random.Range(0, possibleAttacks.Length - 1);

        return(possibleAttacks[randomAttack]);
    }
Ejemplo n.º 2
0
    string RulesInterface.action()
    {
        string animationToPlay = "";
        float  randomValue     = Random.value;

        if (randomValue < 0.9)
        {
            animationToPlay = AnimationStates.BLOCKING_JUMPING;
        }
        else
        {
            string[] possibleAttacks = AnimationStates.GetAirAttacks();
            int      randomAttack    = Random.Range(0, possibleAttacks.Length - 1);
            animationToPlay = possibleAttacks[randomAttack];
        }
        return(animationToPlay);
    }