示例#1
0
    public void SetShoesEquip(S_Wardrobe shoes)
    {
        shoesEquipped = shoes;
        //set other shoes inactive
        if (otherShoes != null)
        {
            foreach (object obj in otherShoes.transform)
            {
                Transform child = (Transform)obj;
                child.gameObject.SetActive(false);
            }
        }
        //set selected shoes active
        switch (shoesEquipped)
        {
        case S_Wardrobe.SHOES_DEFAULT:
            Shoes = transform.Find("Shoes/Default").gameObject;
            break;

        case S_Wardrobe.SHOES_PLATE:
            Shoes = transform.Find("Shoes/Armour1").gameObject;
            break;
        }
        if (shoesEquipped != S_Wardrobe.SHOES_NULL)
        {
            Shoes.SetActive(true);
            ShoesAnim = Shoes.GetComponent <Animator>();
            ShoesAnim.SetBool(attackStyle.ToString(), attackPlaceHolder);
        }
    }