string RulesInterface.action() { string[] possibleAttacks = AnimationStates.GetAirAttacks(); int randomAttack = Random.Range(0, possibleAttacks.Length - 1); return(possibleAttacks[randomAttack]); }
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); }