Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
             * }
             */
        }