예제 #1
0
    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);
        }
    }
예제 #2
0
 public virtual void ElementReaction(Element element)
 {
     if (elementComponent)
     {
         elementComponent.OnHitElement(element);
     }
 }