Beispiel #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;
    }
Beispiel #2
0
    public void SetRightLegModel(LegInventoryItem item)
    {
        if (item == null)
        {
            return;
        }
        if (activeLegRight != null)
        {
            activeLegRight.SetActive(false);
            activeLegRight = null;
        }

        switch (item.legType)
        {
            case enums.legType.leg1:
                activeLegRight = leg1R;
                break;
            case enums.legType.leg2:
                activeLegRight = leg2R;
                break;
            case enums.legType.leg3:
                activeLegRight = leg3R;
                break;
        }
        activeLegRight.SetActive(true);
        rightLegItem = item;
    }
Beispiel #3
0
    public void SetLeftLegModel(LegInventoryItem item)
    {
        if (item == null)
        {
            return;
        }
        if (activeLegLeft != null)
        {
            activeLegLeft.SetActive(false);
            activeLegLeft = null;
        }

        switch (item.legType)
        {
            case enums.legType.leg1:
                activeLegLeft = leg1L;
                break;
            case enums.legType.leg2:
                activeLegLeft = leg2L;
                break;
            case enums.legType.leg3:
                activeLegLeft = leg3L;
                break;
        }
        activeLegLeft.SetActive(true);
        leftLegItem = item;
    }