예제 #1
0
    public void resetModel()
    {
        arm1L.SetActive(false);
        arm1R.SetActive(false);
        arm2L.SetActive(false);
        arm2R.SetActive(false);
        arm3L.SetActive(false);
        arm3R.SetActive(false);

        leg1L.SetActive(false);
        leg1R.SetActive(false);
        leg2L.SetActive(false);
        leg2R.SetActive(false);
        leg3L.SetActive(false);
        leg3R.SetActive(false);

        head1.SetActive(false);
        head2.SetActive(false);
        head3.SetActive(false);

        body1.SetActive(false);
        body2.SetActive(false);
        body3.SetActive(false);

        activeHead = null;
        activeBody = null;
        activeArmLeft = null;
        activeArmRight = null;
        activeLegLeft = null;
        activeLegRight = null;

        headItem = null;
        bodyItem = null;
        leftLegItem = null;
        rightLegItem = null;
        leftArmItem = null;
        rightArmItem = null;
    }
예제 #2
0
    public void SetBodyModel(BodyInventoryItem item)
    {
        if (item == null)
        {
            return;
        }
        if (activeBody != null)
        {
            activeBody.SetActive(false);
            activeBody = null;
        }

        switch (item.bodyType)
        {
            case enums.bodyType.body1:
                activeBody = body1;
                break;
            case enums.bodyType.body2:
                activeBody = body2;
                break;
            case enums.bodyType.body3:
                activeBody = body3;
                break;
        }
        activeBody.SetActive(true);
        bodyItem = item;
    }