// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
    //
    //}

    // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
    //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
    //
    //}

    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        if (processMyAttack == null)
        {
            processMyAttack = animator.transform.GetComponent <ProcessAttack> ();
        }
        processMyAttack.AttackEnd();
    }
Exemple #2
0
        public void ProcessAttackTest()
        {
            //arrange
            var attacks  = new ProcessAttack();
            var pokeList = new List <Pokemon>();

            pokeList.Add(new ElectricType("Jolteon"));
            pokeList.Add(new WaterType("Vaporeon"));
            pokeList.Add(new FireType("Flareon"));
            var actual = attacks.AllPokemonAttack(pokeList);

            string[] expect = { "Electric", "Water", "Fire" };

            for (var i = 0; i < pokeList.Count; i++)
            {
                Assert.AreEqual(expect[i], actual[i].Type);
            }
            //act
        }
Exemple #3
0
 public void Attack(AttackMechanics.RuntimeAttackData data) => ProcessAttack.Execute(data);