示例#1
0
    public override void PutOnAction()
    {
        base.PutOnAction();

        List <ClothModel> avs = characterData.avatars;

        List <ClothModel> result = avs.FindAll(
            delegate(ClothModel v)
        {
            string type = v.wearpos;
            if (type == WearPosConst.WEAR_POS_PANT ||
                type == WearPosConst.WAER_POS_CLOTH)
            {
                return(true);
            }
            return(false);
        });

        for (int i = 0; i < result.Count; i++)
        {
            ClothModel c = result[i];
            PutOnDelete.Add(c.wearpos);
            avs.Remove(result[i]);
        }
    }
示例#2
0
    public override void PutOnAction()
    {
        base.PutOnAction();

        List <ClothModel> avs = characterData.avatars;

        int index = avs.FindIndex(
            delegate(ClothModel v)
        {
            string type = v.wearpos;
            if (type == WearPosConst.WEAR_POS_SUIT)
            {
                return(true);
            }
            return(false);
        });

        if (index > -1)
        {
            ClothModel c = avs[index];
            PutOnDelete.Add(c.wearpos);
            avs.RemoveAt(index);
        }
    }