Example #1
0
    public void Domino()
    {
        if (!dominoEffect)
        {
            fairy.dominoCollider.gameObject.SetActive(true);
            if (fairy.attackedFromRight)
            {
                rgb.velocity = new Vector2(-1f, 2f);
            }
            else
            {
                rgb.velocity = new Vector2(1f, 2f);
            }
            dominoEffect = true;
        }

        if (Physics2D.OverlapCircle(fairy.edgeCheck.position, fairy.groundCheckRadius, fairy.whatIsGround))
        {
            fairy.StartCoroutine(WaitBeforeResuming());
        }
    }