void burnPerson(PersonStatus status) { FireEffect effect = new FireEffect(); effect.initialize(fireDealer); status.ActivePower = effect; }
public ActionResult Perform(Creature creature, GameResult result) { GameEffect fireEffect = new FireEffect(_x, _y, _x + 5, _y + 5, Assets.RootBeer, 1f, 2); GameEvent newEvent = new GameEvent(fireEffect, _x, _y); result.AddEvent(newEvent); return(ActionResult.SUCCESS); }
void Awake() { if (Instance != null) { Debug.LogError("Multiple instances of SpecialEffectsHelper!"); } Instance = this; }
public override SoundContainer GetSoundInstance() { if (BuildingManager.instance.m_properties != null) { FireEffect effect = BuildingManager.instance.m_properties.m_fireEffect as FireEffect; if (effect != null) { return(new SoundContainer(effect.m_soundEffect)); } } return(null); }
protected override void OnDestroy() { //print ("From: " + startingPos + " To: " + this.transform.position); //print ("Distance: " + Vector3.Distance(startingPos, this.transform.position)); GameObject fire = (GameObject)Instantiate(Resources.Load("Particles/Fire"), this.transform.position + new Vector3(0, 0.1f, 0), Quaternion.identity); float scale = 1 + charge; fire.transform.localScale += new Vector3(scale, 0, scale); ParticleSystem[] flames = fire.GetComponentsInChildren <ParticleSystem> (); flames [0].startSize += charge; flames [0].emissionRate += 30 * (1 + charge); flames [0].particleSystem.Simulate(1); flames [0].Play(); FireEffect effect = fire.AddComponent <FireEffect>(); effect.Initialize(owner, charge); }
public static TimeEffect Creat(Unit targetUnit, EffectType EffectType,float power = 0, float totalTime = 10) { TimeEffect effect = null; switch (EffectType) { case EffectType.doubleDamage: effect = new DDEffect(targetUnit, totalTime); break; case EffectType.freez: effect = new FreezEffet(targetUnit, totalTime); break; case EffectType.fire: effect = new FireEffect(targetUnit, totalTime, power); break; case EffectType.parameter: Debug.LogError("Dont creat this effect type bu this method"); break; } CheckOldEffect(targetUnit, effect); targetUnit.efftcs.Add(effect); return effect; }
public override void deliverOnCollisionEffect(Collider other, PersonStatus status) { if (other.tag != "Person") { return; } if (other == status.collider) { return; } AnimationScript other_anim = other.GetComponent <AnimationScript>(); PersonStatus otherPerson = other.GetComponent <PersonStatus>(); if (otherPerson.ActivePower == null) { FireEffect effect = new FireEffect(); effect.initialize(owner); otherPerson.ActivePower = effect; } }
public static TimeEffect Creat(Unit targetUnit, EffectType EffectType,float power = 0) { Debug.Log("Effect setted " + EffectType); TimeEffect effect = null; switch (EffectType) { case EffectType.doubleDamage: effect = new DDEffect(targetUnit); break; case EffectType.slow: // targetUnit.Parameters.Parameters[ParamType.Speed] /= 3f; break; case EffectType.freez: break; case EffectType.speed: effect = new SpeedEffect(targetUnit); break; case EffectType.fire: effect = new FireEffect(targetUnit,power); break; } return effect; }
public void AddEffect(ElementalType type, int shapeId) { Debug.Log("Add effect: " + gameObject.tag); switch (type) { case ElementalType.fire: FireEffect fireEffect = new FireEffect(); fireEffect.spellType = ElementalType.fire; fireEffect.shapeId = shapeId; fireEffect.monster = gameObject; fireEffect.InitEffect(10f, 1f, 5f, 1f, 10f); spellEffects.Add(fireEffect); break; case ElementalType.ice: IceEffect iceEffect = new IceEffect(); iceEffect.spellType = ElementalType.ice; iceEffect.shapeId = shapeId; iceEffect.monster = gameObject; iceEffect.InitEffect(10f, 1f, 0.5f, 5f); spellEffects.Add(iceEffect); break; case ElementalType.earth: earthEffect earthEffect = new earthEffect(); earthEffect.spellType = ElementalType.earth; earthEffect.shapeId = shapeId; earthEffect.monster = gameObject; earthEffect.InitEffect(10f, 1f, 5f, 1f, 10f); spellEffects.Add(earthEffect); break; case ElementalType.death: deathEffect deathEffect = new deathEffect(); deathEffect.spellType = ElementalType.death; deathEffect.shapeId = shapeId; deathEffect.monster = gameObject; deathEffect.InitEffect(10f, 1f, 5f, 1f, 10f); spellEffects.Add(deathEffect); break; case ElementalType.poison: poisonEffect poisonEffect = new poisonEffect(); poisonEffect.spellType = ElementalType.poison; poisonEffect.shapeId = shapeId; poisonEffect.monster = gameObject; poisonEffect.InitEffect(10f, 1f, 5f, 1f, 10f); spellEffects.Add(poisonEffect); break; default: break; } }