Beispiel #1
0
    public HFX_ParticleSystem PlayParticle(Transform parent, HFX_ParticleSystem prefab)
    {
        HFX_ParticleSystem system = GameObject.Instantiate <HFX_ParticleSystem>(prefab);

        system.transform.SetParent(parent, false);
        system.SetLightingMax(1f);
        system.Delay = PlaybackTime;
        system.Play(true, 0);

        m_PlayingParticles.Add(system);
        return(system);
    }
Beispiel #2
0
 void PlayParticle()
 {
     if (particle != null)
     {
         if (m_Particle == null)
         {
             m_Particle = GameObject.Instantiate <HFX_ParticleSystem>(particle);
             m_Particle.SetLightingMax(1f);
             m_Particle.transform.SetParent(transform, false);
         }
         m_Particle.Play(false, 0);
     }
 }
Beispiel #3
0
    public HFX_ParticleSystem PlayParticle(HFX_ParticleSystem particle_prefab)
    {
        HFX_ParticleSystem particle_system = GameObject.Instantiate <HFX_ParticleSystem>(particle_prefab);

        particle_system.transform.SetParent(transform, false);
        particle_system.Play(true, 0);
        m_PlayingParticles.Add(particle_system);

        if (CharacterAnimation.Material.HasProperty("_LightMax"))
        {
            particle_system.SetLightingMax(CharacterAnimation.Material.GetFloat("_LightMax"));
        }
        particle_system.SetLensTilt(CharacterAnimation.IsUIMode == true ? 0.15f : 0f);

        return(particle_system);
    }
Beispiel #4
0
 override protected void Start(float playback_time)
 {
     base.Start(playback_time);
     if (particle_system_prefab != null)
     {
         particle_system = GameObject.Instantiate <HFX_ParticleSystem>(particle_system_prefab);
         particle_system.transform.SetParent(target.transform, false);
         particle_system.transform.localPosition += particle_position;
         particle_system.transform.localScale     = Vector3.Scale(particle_system.transform.localScale, particle_scale);
         particle_system.SetLightingMax(IsLighting ? 1f : 0f);
         particle_system.Play(true, 0);
         particle_system.SetLensTilt(target.CharacterAnimation.IsUIMode ? 0.15f : 0f);
         if (IsHidden)
         {
             particle_system.SetHidden(true);
         }
     }
     if (sound_list != null && sound_list.Length > 0 && sound_list[0].sound != null)
     {
         sound_play = SoundManager.PlaySound(sound_list, -(playback_time - time), sound_tick, sound_count, sound_loop);
     }
 }