Ejemplo n.º 1
0
        override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
            if (!isOn && (stateInfo.normalizedTime % 1) >= AttackActivation.minValue)
            {
                animal.AttackTrigger(AttackTrigger);
                isOn = true;
            }

            if (!isOff && (stateInfo.normalizedTime % 1) >= AttackActivation.maxValue)
            {
                animal.AttackTrigger(0);
                isOff = true;
            }
        }