public void DisplayBarrierCreation(CChar target, MHit hit, MBarrier barrier) { var dmgData = new HitDisplayData(); dmgData.Color = CombatGUIParams.BLUE; dmgData.Hit = hit; dmgData.Priority = ViewParams.BARRIER_PRIORITY; dmgData.Text = barrier.MaxHP.ToString(); dmgData.Target = target.GameHandle; dmgData.YOffset = CombatGUIParams.FLOAT_OFFSET; dmgData.Hit.AddDataDisplay(dmgData); this.DisplayBarrier(target, hit); var controller = new ParticleController(); var util = new DecoUtil(); var particles = controller.CreateParticle(BARRIER_PARTICLE_PATH); util.AttachEffectParticlesToChar(target, particles, EEffect.Barrier); }
public void ApplyEffectFx(CTile tile) { if (tile.Model.GetCurrentOccupant() != null) { if (tile.Model.GetCurrentOccupant().GetType() == typeof(CChar)) { var controller = new ParticleController(); var util = new DecoUtil(); var particles = controller.CreateParticle(this.Data.ParticlePath); var tgt = tile.Model.GetCurrentOccupant() as CChar; util.AttachEffectParticlesToChar(tgt, particles, this.Type); } } var placeHolder = new GameObject(); var script = placeHolder.AddComponent <SDestroyByLifetime>(); script.AddCallback(this.CallbackHandler); script.Init(placeHolder, 0.2f); }