Beispiel #1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (inCooldown || To == null)
        {
            return;
        }
        BoomObject boom;

        if (collision.transform.TryGetComponent(out boom))
        {
            boom.transform.position = To.transform.position;
            StartCoroutine(CooldownCoroutine());
            To.StartCoroutine(To.CooldownCoroutine());
        }
    }