Beispiel #1
0
    IEnumerator CapturePhoton()
    {
        if (photon.captured || invincible || !canCapture)
        {
            yield break;
        }
        capturing   = true;
        rb.velocity = Vector2.zero;
        photonTransform.position = transform.position;
        photon.StartCapture();

        edgeCol.enabled = true;

        yield return(new WaitForSeconds(captureTime));

        capturing = false;
        photon.EndCapture();
        Die();
    }