CharacterBehavior.ThrowImp C# (CSharp) Method

ThrowImp() public method

public ThrowImp ( float FM ) : void
FM float
return void
    public void ThrowImp(float FM)
    {
        HoldingImp = "";
        GameObject childImp = transform.GetChild(5).gameObject;
        childImp.GetComponent<ImpAI>().held = false;
        childImp.transform.parent = null;
        Rigidbody2D childRb = childImp.GetComponent<Rigidbody2D>();
        childRb.isKinematic = false;
        childRb.AddForce(mP.direction * FM, ForceMode2D.Impulse);
        //if (childImp.GetComponent<ImpAI>().dead == false)
        //{
            childImp.GetComponent<BoxCollider2D>().enabled = true;
        //}
        //else
        //{
            //childImp.transform.FindChild("ImpTrigger").GetComponent<CircleCollider2D>().enabled = true;
        //}
            if (childImp.GetComponent<ImpAI>().DropKill == true)
            {
                Destroy(childImp);
            }
    }