Пример #1
0
    protected void OnTriggerEnter2D(Collider2D collision)
    {
        IAvatar colAvatar = collision.gameObject.GetComponent <IAvatar>();

        if (colAvatar != null)
        {
            if (owner.GetElement() > colAvatar.GetElement())
            {
                colAvatar.Die(owner.GetObject());
            }
        }
    }