public virtual void ElementReaction(Element element) { if (elementComponent) { switch (element) { case Element.Fire: if (iceParticle != null) { GridFunctionUtility.CreateParticleAt(fireParticle, this); } break; case Element.Ice: if (iceParticle != null) { GridFunctionUtility.CreateParticleAt(iceParticle, this); } break; default: break; } elementComponent.OnHitElement(element); eElementReaction.Invoke(element); } }
public virtual void ElementReaction(Element element) { if (elementComponent) { elementComponent.OnHitElement(element); } }