private void AttachBloodHead(GameObject head)
        {
            var controller = new ParticleController();
            var path       = StringUtil.PathBuilder(
                CombatGUIParams.EFFECTS_PATH,
                CombatGUIParams.SLASH_FATALITY,
                CombatGUIParams.PARTICLES_EXTENSION);
            var blood  = controller.CreateParticle(path);
            var script = blood.AddComponent <SDestroyByLifetime>();

            script.Init(blood, 4f);
            controller.AttachParticle(head, blood);
        }
Exemple #2
0
 private void ProcessParticles(CChar c)
 {
     if (this._data.ParticlePath != null && !this._data.ParticlePath.Equals(""))
     {
         var path = StringUtil.PathBuilder(
             CombatGUIParams.EFFECTS_PATH,
             this._data.ParticlePath,
             CombatGUIParams.PARTICLES_EXTENSION);
         var controller = new ParticleController();
         var particles  = controller.CreateParticle(path);
         var script     = particles.AddComponent <SDestroyByLifetime>();
         script.Init(particles, CombatGUIParams.PARTICLE_DUR);
         controller.AttachParticle(c.GameHandle, particles);
     }
 }
        private void AttachBloodParticles(object o)
        {
            var controller = new ParticleController();
            var path       = StringUtil.PathBuilder(
                CombatGUIParams.EFFECTS_PATH,
                "Bleed",
                CombatGUIParams.PARTICLES_EXTENSION);
            var particles = controller.CreateParticle(path);

            if (particles != null)
            {
                controller.AttachParticle(this._targetHandle, particles);
            }
            var script = particles.AddComponent <SDestroyByLifetime>();

            script.Init(particles, 1f);
        }
Exemple #4
0
        // TODO: Move particle creation to load from .xml files
        private void CreateWaterParticles(CChar c, MTile t)
        {
            var controller = new ParticleController();
            var path       = StringUtil.PathBuilder(
                CombatGUIParams.EFFECTS_PATH,
                "Water",
                CombatGUIParams.PARTICLES_EXTENSION);
            var particles = controller.CreateParticle(path);

            if (particles != null)
            {
                controller.AttachParticle(t.Controller.Handle, particles);
            }
            var script = particles.AddComponent <SDestroyByLifetime>();

            script.Init(particles, 5f);
        }
        public void ProcessSongFX(MAction a)
        {
            var controller = new ParticleController();
            var ability    = a.ActiveAbility as MSong;

            VCombatController.Instance.DisplayActionEventName(a);
            var path = StringUtil.PathBuilder(
                CombatGUIParams.EFFECTS_PATH,
                ability.SongType.ToString().Replace("_", ""),
                CombatGUIParams.PARTICLES_EXTENSION);
            var particles = controller.CreateParticle(path);
            var script    = particles.AddComponent <SDestroyByLifetime>();

            script.Init(particles, 5f);
            controller.AttachParticle(a.Data.Source.GameHandle, particles);
            foreach (var hit in a.Data.Hits)
            {
                hit.CallbackHandler(this);
            }
        }