예제 #1
0
    void OnCollisionEnter2D(Collision2D other)
    {
        BotController e = other.collider.GetComponent <BotController>();

        if (e != null)
        {
            e.Fix();
        }

        BoxController b = other.collider.GetComponent <BoxController>();

        if (b != null)
        {
            b.Loot();
        }
        Destroy(gameObject);
    }