protected override void OnUpdate(IEffectEntity effectEntity, ref bool keepAlive)
        {
            base.OnUpdate(effectEntity, ref keepAlive);

            if (effectEntity.IsPlaying(PlayId))
            {
                keepAlive = true;
            }
            else if (hasFadeState && effectEntity.IsFading(PlayId) && fadeHash == animator.GetCurrentAnimatorStateInfo(0).shortNameHash)
            {
                keepAlive = true;
            }
        }
Ejemplo n.º 2
0
        protected override void OnUpdate(IEffectEntity effectEntity, ref bool keepAlive)
        {
            base.OnUpdate(effectEntity, ref keepAlive);

            if (effectEntity.IsPlaying(PlayId) && effectEntity.KeepAliveWithNoParticles)
            {
                keepAlive = true;
            }
            else
            {
                foreach (ParticleSystem system in trackedParticleSystems)
                {
                    keepAlive |= system.IsAlive(false);
                }
            }
        }
Ejemplo n.º 3
0
                public bool DoUpdate()
                {
                    if (!projectile.IsPlaying(playId))
                    {
                        return(true);
                    }

                    if (TargetRenderer != null)
                    {
                        lastKnownTargetPosition = TargetRenderer.TagContainer.FindTag(DefaultTargetTag);
                    }

                    float ratio = (float)(BoltNetwork.ServerFrame - ServerLaunchFrame) / ExpectedDelayFrames;

                    projectile.Transform.position = Vector3.Lerp(casterLaunchPosition, lastKnownTargetPosition, ratio);

                    if (lastKnownTargetPosition != projectile.Transform.position)
                    {
                        projectile.Transform.rotation = Quaternion.LookRotation(lastKnownTargetPosition - projectile.Transform.position);
                    }

                    return(ratio >= 1.0f);
                }