Exemplo n.º 1
0
        //此函数被反射调用的,不能删
        public void OnPlayParticle(MoveEditor.MoveAnimationEvent e)
        {
            //ParticleEventInfo evt = new MoveEditor.ParticleEventInfo(e.stringParameter);
            ParticleEventInfo evt = e.EventRef as ParticleEventInfo;

            PlayParticle(evt._particleProperties);
        }
Exemplo n.º 2
0
        public void OnPostFxWarpEvent(MoveEditor.MoveAnimationEvent e)
        {
            //PostWarpEventInfo evt = new PostWarpEventInfo(e.stringParameter);
            PostWarpEventInfo evt = e.EventRef as PostWarpEventInfo;

            _activePostFxEvents.Add(evt);
        }
Exemplo n.º 3
0
    //Animation Event Handlers
    public void OnSetAnimationSpeed(MoveEditor.MoveAnimationEvent ee)
    {
        MoveEditor.AnimationSpeedEventInfo info = ee.EventRef as MoveEditor.AnimationSpeedEventInfo;
        float variance = UnityEngine.Random.Range(-info.asep._plusMinus, info.asep._plusMinus);

        variance         = (variance < 0 ? -1 : 1) * variance;
        m_Animator.speed = info._floatParameter + variance;
    }
Exemplo n.º 4
0
 public MoveEvent(MoveEditor.MoveAnimationEvent ee, bool isRequired, bool isPlayOnce, bool isPersistent, float endingFrame)
 {
     myAnimEvent = ee;
     required    = isRequired;
     playOnce    = isPlayOnce;
     persistent  = isPersistent;
     endFrame    = endingFrame;
 }
Exemplo n.º 5
0
        public void OnModifyEnvironmentLighting(MoveEditor.MoveAnimationEvent e)
        {
            //EnvironmentLightingEventInfo evt = new EnvironmentLightingEventInfo(e.stringParameter);
            EnvironmentLightingEventInfo  evt        = e.EventRef as EnvironmentLightingEventInfo;
            EnvironmentLightingProperties properties = evt._lightingProperties;

            float duration = Mathf.Max(properties._multiplyDuration, properties._addDuration);

            _activeEnvLightingInfo = new EnvLightingInfo(properties, duration);
        }
Exemplo n.º 6
0
    private void PlayEffects(ProjectileEvent projectileEvent)
    {
        if (_fxHelper == null)
        {
            return;
        }

        for (int j = 0; j < projectileEvent._particles.Count; ++j)
        {
            MoveEditor.ParticleEventInfo particleEventInfo = projectileEvent._particles[j];

            // Dirty hack here - if the particle's set to spawn at hit point, we call the player's FXHelper
            // the reason being that if we don't then the effects will get destroyed since the projectile would likely be deactivated on hit, thus destroying all its fx
            if (particleEventInfo._particleProperties._spawnAtHitPoint)
            {
                MoveEditor.MoveAnimationEvent moveEvent = new MoveEditor.MoveAnimationEvent()
                {
                    EventRef = particleEventInfo
                };
                _owner.OnHandleMessage("OnPlayParticle", moveEvent);
                //_owner.FXHelper.PlayParticle(particleEventInfo._particleProperties);
            }
            else
            {
                _fxHelper.PlayParticle(particleEventInfo._particleProperties);
            }
        }

        for (int j = 0; j < projectileEvent._trails.Count; ++j)
        {
            MoveEditor.TrailRendererEventInfo trailEventInfo = projectileEvent._trails[j];
            _fxHelper.PlayTrailRenderer(trailEventInfo._trailRendererProperties);
        }

        for (int j = 0; j < projectileEvent._dynamicLights.Count; ++j)
        {
            MoveEditor.DynamicLightEventInfo dynamicLights = projectileEvent._dynamicLights[j];
            _fxHelper.PlayDynamicLight(dynamicLights._dynamicLightProperties);
        }

        AttributeData attr = _owner.OnGetAttributeData("IsCurrentAttackCritical");

        for (int i = 0; i < projectileEvent._cameraShakes.Count; ++i)
        {
            MoveEditor.CameraShakeEventInfo shakeInfo = projectileEvent._cameraShakes[i];
            MoveCameraShakeHelper.Shake(shakeInfo, _owner != null && attr.IsCurrentAttackCritical);
        }
    }
Exemplo n.º 7
0
 private void OnClearParticle(MoveEditor.MoveAnimationEvent e)
 {
     StopParticle(e.stringParameter, true);
 }
Exemplo n.º 8
0
 private void OnStopParticle(MoveEditor.MoveAnimationEvent e)
 {
     StopParticle(e.stringParameter);
 }
Exemplo n.º 9
0
 private void OnStopDynamicLight(MoveEditor.MoveAnimationEvent e)
 {
     StopDynamicLight(e.stringParameter);
 }
Exemplo n.º 10
0
 private void OnStopTrailRenderer(MoveEditor.MoveAnimationEvent e)
 {
     StopTrailRenderer(e.stringParameter);
 }
Exemplo n.º 11
0
        //public void OnPlayCameraShake(MoveEditor.MoveAnimationEvent e)
        //{
        //    //var info = new MoveEditor.CameraShakeEventInfo(e.stringParameter);
        //    var info = e.EventRef as CameraShakeEventInfo;
        //    bool isCrit = false;
        //    if (_player == null)
        //    {
        //        _player = GetComponent<Hotfix_LT.Combat.Combatant>();
        //    }
        //    if (_player != null)
        //    {
        //        isCrit = _player.IsCurrentAttackCritical();
        //    }
        //    MoveCameraShakeHelper.Shake(info, isCrit);
        //}

        public void OnPlayCameraShakeEx(MoveEditor.MoveAnimationEvent e, bool isCrit)
        {
            var info = e.EventRef as CameraShakeEventInfo;

            MoveCameraShakeHelper.Shake(info, isCrit);
        }
Exemplo n.º 12
0
 public virtual void OnTriggerCombo(MoveEditor.MoveAnimationEvent ee)
 {
 }
Exemplo n.º 13
0
 public virtual void OnInflictHit(MoveEditor.MoveAnimationEvent ee)
 {
 }
Exemplo n.º 14
0
 public virtual void OnReactionComboEvent(MoveEditor.MoveAnimationEvent ee)
 {
 }
Exemplo n.º 15
0
 public virtual void OnPlayTargetHitReactionEvent(MoveEditor.MoveAnimationEvent ee)
 {
 }