Example #1
0
    public void Interact()
    {
        Collider2D         c      = Physics2D.OverlapPoint(transform.position, interactLayer);
        SummonableSkeleton summon = c.GetComponentInParent <SummonableSkeleton>();

        if (summon != null)
        {
            if (minionManager.CheckSummonCost(summon.cost))
            {
                summon.Spawn();
                minionManager.ChangePower(-summon.cost);
            }
        }
    }