public void ExecuteScreenEffect(string name, float intens = 1f) { EntityPlayerLocal player = GameManager.Instance.World.GetLocalPlayers()[0]; player.ScreenEffectManager.SetScreenEffect(name); GameManager.Instance.StartCoroutine(Routines.Call( () => player.ScreenEffectManager.SetScreenEffect(name, intens), 4f )); /* * Blur : flou * Bright : brillant lumineux * Cold : contour ecran * Dark : contour ecran * Dead (no intensity) : contour ecran * Distortion : taré ! * Drunk * Dying (no intensity) * Hot : contour ecran * Posterize : effets de gamma bizarre ? * Underwater * Vibrant : lumineux * VibrantDeSat */ }
public static IEnumerator PlayZBSound(string sound, Vector3 pos, EntityPlayer player, World World = null, int _SetSoundMode = 1, int reduce = 0, float rate = 1f) { if (rate < 1 && Rand.NextDouble() >= rate) { return(Iterating.Iter.Empty()); //(new object[]{_WaitFrame}).GetEnumerator(); } if (World == null) { World = GameManager.Instance.World; } if (SetSoundMode > -1) { _SetSoundMode = SetSoundMode; } if (_SetSoundMode == 0) { return(Routines.Call( World.GetGameManager().PlaySoundAtPositionServer, pos, sound, AudioRolloffMode.Custom, 300 // unnoisy )); } if (_SetSoundMode == 1) { return(Routines.Call( World.GetGameManager().PlaySoundAtPositionServer, pos, sound, AudioRolloffMode.Linear, 1 + reduce // less noisy )); } if (_SetSoundMode == 2) { return(Routines.Call(Audio.Manager.BroadcastPlay, player, sound)); // too noisy } return(Routines.Call(Audio.Manager.BroadcastPlay, pos, sound, 0f)); // Much less unnoisy }
protected override void OnTrigger() { IEnumerator routine = null; switch (type) { case Type.Color: routine = Routines.Lerp(material.color, color, duration, (Color val) => { material.color = val; }, Color.Lerp); break; case Type.SetFloat: routine = Routines.Lerp(material.GetFloat(propertyName), floatValue, duration, (float val) => { material.SetFloat(propertyName, val); }, Routines.Lerp); break; case Type.SetInteger: routine = Routines.Lerp(material.GetInt(propertyName), integerValue, duration, (float val) => { material.SetInt(propertyName, Mathf.CeilToInt(val)); }, Routines.Lerp); break; case Type.SetTexture: routine = Routines.Call(() => { material.SetTexture(propertyName, texture); }, duration); break; case Type.Lerp: routine = Routines.Lerp((float t) => { material.Lerp(material, material2, t); }, duration); break; default: break; } this.StartCoroutine(routine, "Interpolate"); }
public override void Effect1(EntityPlayer player, Emplacement place, OptionEffect opt) { Printer.Log(40, "Puit Effect1", place.position, place.ipos, opt.OptionBlock.blocks, opt.OptionShape.shape); Zombiome.Routines.Named("Puit").Start( Routines.Call(biome.groundParticleEffect, place.ipos), new WaitForSeconds(1f), EffectsCollapse.Puit(player, place, opt) ); }
public override void Effect1(EntityPlayer player, Emplacement place, OptionEffect opt) { Printer.Log(40, "Cave Effect1", place.position, place.ipos, opt.OptionBlock.blocks, opt.OptionShape.shape); Zombiome.Routines.Named("Cave").Start( Routines.Call(biome.groundParticleEffect, place.ipos), ZBActivity.Environment.ZBSounds.Play("light_pipebomb", place.position, player, World, 1, 0, 0.2f), new WaitForSeconds(1f), EffectsCollapse.Cave(player, place, opt) ); }
public override void Effect1(EntityPlayer player, Emplacement place, OptionEffect opt) { Printer.Log(40, "TrapLine Effect1", place.position, place.ipos, opt.OptionBlock.blocks, opt.OptionShape.shape); Zombiome.Routines.Named("TrapLine").Start( Routines.Call(biome.groundParticleEffect, place.ipos), ZBActivity.Environment.ZBSounds.Play(this.biome.groundNoise, place.position, player, World, 2, 0, 0.2f), new WaitForSeconds(1f), EffectsGround.TrapLine(player, place, opt) ); }
public override void Effect1(EntityPlayer player, Emplacement place, OptionEffect opt) { Printer.Log(60, "Geyser Effect1", place.position, place.ipos, opt.OptionBlock.blocks, opt.OptionShape.shape); Zombiome.Routines.Named("Geyser").Start( // treeGib_birch_15m creates falling leaves above smoke :( Routines.Call(EffectsItem.SpawnParticle, place.position, "treeGib_burnt_small"), new WaitForSeconds(1f), EffectsGround.Peak(player, place, opt) ); }
public override void Effect1(EntityPlayer player, Emplacement place, OptionEffect opt) { Printer.Log(40, "Wave Effect1", place.position, place.ipos, opt.OptionBlock.blocks, opt.OptionShape.shape); Zombiome.Routines.Named("Wave").Start( Routines.Call(biome.groundParticleEffect, place.ipos), // Routines.Call(__BUG), // TEST new WaitForSeconds(1f), EffectsGround.Wave(player, place, opt) ); }
public override void Effect1(EntityPlayer player, Emplacement place, OptionEffect opt) { Printer.Log(40, "RiftCollapse Effect1", place.position, place.ipos, opt.OptionBlock.blocks, opt.OptionShape.shape); // Zombiome.Routines.Start(EffectsCollapse.Rift(player, place, opt), "RiftCollapse"); Zombiome.Routines.Named("RiftCollapse").Start( Routines.Call(biome.groundParticleEffect, place.ipos), ZBActivity.Environment.ZBSounds.Play(ZBiomeInfo.NoiseCollapse, place.position, player, World, 1, 20, 0.2f), new WaitForSeconds(1f), EffectsCollapse.Rift(player, place, opt) ); }
public override void Effect1(EntityPlayer player, Emplacement place, OptionEffect opt) { Printer.Log(60, "Peak Effect1", place.position, place.ipos, opt.OptionBlock.blocks, opt.OptionShape.shape); // FIXME: this syntax cannot be merged ! Zombiome.Routines.Named("Peak").Start( // treeGib_birch_15m creates falling leaves above smoke :( Routines.Call(biome.groundParticleEffect, place.ipos), // "treeGib_burnt_small" new WaitForSeconds(1f), EffectsGround.Peak(player, place, opt) ); }
public override IEnumerator Apply(EntityPlayer player, EntityAlive target, OptionEffect opt) { Vector3 pos = target.GetPosition(); Emplacement place = Emplacement.At(pos, Placer.directions.Generate(pos)); Printer.Log(40, "Peak Effect1", place.position, place.ipos, opt.OptionBlock.blocks, opt.OptionShape.shape); Zombiome.Routines.Named("PeakAt").Start( Routines.Call(biome.groundParticleEffect, place.ipos), new WaitForSeconds(1f), EffectsGround.Peak(player, place, opt) ); yield break; }