Beispiel #1
0
    void OnTriggerEnter(Collider collider)
    {
        UnitBase unitBase = collider.GetComponent <UnitBase>();

        if (unitBase != null)
        {
            if (unitBase == m_Unit)
            {
                return;
            }

            DamageFunc(unitBase);
        }
        ElementBase eleTmp = collider.GetComponent <ElementBase>();

        if (eleTmp != null)
        {
            if (eleTmp.GetUnit().GetType() == m_Unit.GetType())
            {
                return;
            }
        }

        m_goExplosion = ObjectPool.GetInst().GetObject(EffectMgr.GetInst().GetEffect((int)E_EFFECTID.EXPLOSION));

        m_goExplosion.transform.position = transform.position;

        PooledThis();
    }