Пример #1
0
 public override void OnExit(StatewithEffect stateEffect, Animator animator, AnimatorStateInfo stateInfo)
 {
     if (!stateEffect.CharacterControl.VFXHold.isPaused)
     {
         stateEffect.CharacterControl.VFXHold.Pause(true);
         stateEffect.CharacterControl.VFXHold.Clear();
         WeaponObject weaponObject = stateEffect.CharacterControl.gameObject.GetComponentInChildren <WeaponObject> ();
         weaponObject.ToggleWeaponMaterial();
     }
 }
Пример #2
0
        public override void UpdateEffect(StatewithEffect stateEffect, Animator animator, AnimatorStateInfo stateInfo)
        {
            //if (stateInfo.normalizedTime > TurnOnVFXTiming && stateInfo.normalizedTime <= TurnOffVFXTiming && stateEffect.CharacterControl.VFXHold.isPaused) {
            if (stateInfo.normalizedTime > TurnOnVFXTiming && stateEffect.CharacterControl.VFXHold.isPaused)
            {
                stateEffect.CharacterControl.VFXHold.Play(true);
                WeaponObject weaponObject = stateEffect.CharacterControl.gameObject.GetComponentInChildren <WeaponObject> ();
                weaponObject.ToggleWeaponMaterial();
            }

            /*
             * if (stateInfo.normalizedTime > TurnOffVFXTiming && !stateEffect.CharacterControl.VFXHold.isPaused) {
             *  stateEffect.CharacterControl.VFXHold.Pause(true);
             *  stateEffect.CharacterControl.VFXHold.Clear();
             * }
             */
        }