Example #1
0
    //Nina starts


    void OnJointBreak2D(Joint2D brokenJoint)
    {
        for (int i = 0; i < LowerPartsOfBody.Length; i++)
        {
            StickmanBody stickmanBody = LowerPartsOfBody[i].gameObject.GetComponent <StickmanBody>();


            _levelManager.DestroyedPartsOfBodyList.Add(stickmanBody);
            stickmanBody.AreAddedToDestroyList = true;
            stickmanBody.DestroyedLowerPartsOfBody();
        }

        _levelManager.DestroyStickmanBody();
    }
Example #2
0
    public void DestroyedLowerPartsOfBody()
    {
        if (AreAddedToDestroyList)
        {
            for (int i = 0; i < LowerPartsOfBody.Length; i++)
            {
                _levelManager.DestroyedPartsOfBodyList.Add(LowerPartsOfBody[i].GetComponent <StickmanBody>());

                StickmanBody stickmanBody = LowerPartsOfBody[i].gameObject.GetComponent <StickmanBody>();
                stickmanBody.AreAddedToDestroyList = true;
                stickmanBody.DestroyedLowerPartsOfBody();
            }
        }
    }