示例#1
0
 // Token: 0x06002F8E RID: 12174 RVA: 0x000B738C File Offset: 0x000B558C
 public static global::ArmorModelSlot[] ToArray(this global::ArmorModelSlotMask slotMask)
 {
     global::ArmorModelSlot[] array  = global::ArmorModelSlotUtility.Mask2SlotArray.FlagToSlotArray[(int)(slotMask & (global::ArmorModelSlotMask.Feet | global::ArmorModelSlotMask.Legs | global::ArmorModelSlotMask.Torso | global::ArmorModelSlotMask.Head))];
     global::ArmorModelSlot[] array2 = new global::ArmorModelSlot[array.Length];
     for (int i = 0; i < array.Length; i++)
     {
         array2[i] = array[i];
     }
     return(array2);
 }
示例#2
0
    // Token: 0x06002F91 RID: 12177 RVA: 0x000B7400 File Offset: 0x000B5600
    public static int GetUnmaskedSlotCount(this global::ArmorModelSlotMask slotMask)
    {
        uint num  = (uint)(~slotMask & (global::ArmorModelSlotMask.Feet | global::ArmorModelSlotMask.Legs | global::ArmorModelSlotMask.Torso | global::ArmorModelSlotMask.Head));
        int  num2 = 0;

        while (num != 0u)
        {
            num2++;
            num &= num - 1u;
        }
        return(num2);
    }
示例#3
0
    // Token: 0x06002F7B RID: 12155 RVA: 0x000B6D34 File Offset: 0x000B4F34
    public global::ArmorModelSlotMask BindArmorGroup(global::ArmorModelGroup group)
    {
        global::ArmorModelSlotMask armorModelSlotMask = (global::ArmorModelSlotMask)0;

        if (group)
        {
            for (global::ArmorModelSlot armorModelSlot = global::ArmorModelSlot.Feet; armorModelSlot < (global::ArmorModelSlot)4; armorModelSlot += 1)
            {
                global::ArmorModel armorModel = group[armorModelSlot];
                if (armorModel && this.BindArmorModelCheckedNonNull(armorModel))
                {
                    armorModelSlotMask |= armorModelSlot.ToMask();
                }
            }
        }
        return(armorModelSlotMask);
    }
示例#4
0
    // Token: 0x06002F79 RID: 12153 RVA: 0x000B6C54 File Offset: 0x000B4E54
    public global::ArmorModelSlotMask BindArmorModels(global::ArmorModelMemberMap map, global::ArmorModelSlotMask slotMask)
    {
        if (!this.awake)
        {
            return(this.Initialize(map, slotMask));
        }
        global::ArmorModelSlotMask armorModelSlotMask = (global::ArmorModelSlotMask)0;

        foreach (global::ArmorModelSlot slot in slotMask.EnumerateSlots())
        {
            if (this.BindArmorModel(map[slot], slot))
            {
                armorModelSlotMask |= slot.ToMask();
            }
        }
        return(armorModelSlotMask);
    }
示例#5
0
    // Token: 0x06002F78 RID: 12152 RVA: 0x000B6C00 File Offset: 0x000B4E00
    public global::ArmorModelSlotMask BindArmorModels(global::ArmorModelMemberMap map)
    {
        if (!this.awake)
        {
            return(this.Initialize(map, global::ArmorModelSlotMask.Feet | global::ArmorModelSlotMask.Legs | global::ArmorModelSlotMask.Torso | global::ArmorModelSlotMask.Head));
        }
        global::ArmorModelSlotMask armorModelSlotMask = (global::ArmorModelSlotMask)0;

        for (global::ArmorModelSlot armorModelSlot = global::ArmorModelSlot.Feet; armorModelSlot < (global::ArmorModelSlot)4; armorModelSlot += 1)
        {
            if (this.BindArmorModel(map[armorModelSlot], armorModelSlot))
            {
                armorModelSlotMask |= armorModelSlot.ToMask();
            }
        }
        return(armorModelSlotMask);
    }
示例#6
0
 // Token: 0x06002F7A RID: 12154 RVA: 0x000B6CB4 File Offset: 0x000B4EB4
 public global::ArmorModelSlotMask BindArmorGroup(global::ArmorModelGroup group, global::ArmorModelSlotMask slotMask)
 {
     if (this.awake)
     {
         global::ArmorModelSlotMask armorModelSlotMask = (global::ArmorModelSlotMask)0;
         foreach (global::ArmorModelSlot slot in slotMask.EnumerateSlots())
         {
             global::ArmorModel armorModel = group[slot];
             if (armorModel && this.BindArmorModelCheckedNonNull(armorModel))
             {
                 armorModelSlotMask |= slot.ToMask();
             }
         }
         return(armorModelSlotMask);
     }
     if (!group)
     {
         return((global::ArmorModelSlotMask)0);
     }
     return(this.Initialize(group.armorModelMemberMap, slotMask));
 }
示例#7
0
 // Token: 0x06002F8F RID: 12175 RVA: 0x000B73C8 File Offset: 0x000B55C8
 public static global::ArmorModelSlot[] EnumerateSlots(this global::ArmorModelSlotMask slotMask)
 {
     return(global::ArmorModelSlotUtility.Mask2SlotArray.FlagToSlotArray[(int)(slotMask & (global::ArmorModelSlotMask.Feet | global::ArmorModelSlotMask.Legs | global::ArmorModelSlotMask.Torso | global::ArmorModelSlotMask.Head))]);
 }
示例#8
0
 // Token: 0x06002F8D RID: 12173 RVA: 0x000B7370 File Offset: 0x000B5570
 public static bool Contains(this global::ArmorModelSlot slot, global::ArmorModelSlotMask slotMask)
 {
     return(slot < (global::ArmorModelSlot)4 && (slotMask & (global::ArmorModelSlotMask)(1 << (int)slot)) != (global::ArmorModelSlotMask)0);
 }
示例#9
0
    // Token: 0x06002F80 RID: 12160 RVA: 0x000B6ED8 File Offset: 0x000B50D8
    private global::ArmorModelSlotMask Initialize(global::ArmorModelMemberMap memberMap, global::ArmorModelSlotMask memberMask)
    {
        this.awake = true;
        string            rendererName = global::ArmorModelSlot.Head.GetRendererName();
        ActorRig          actorRig     = this.defaultArmorModelGroup[global::ArmorModelSlot.Head].actorRig;
        ActorMeshRenderer actorMeshRenderer;

        if (this.originalRenderer)
        {
            actorMeshRenderer = ActorMeshRenderer.Replace(this.originalRenderer, actorRig, this.boneStructure.rigOrderedTransformArray, rendererName);
        }
        else
        {
            actorMeshRenderer = ActorMeshRenderer.CreateOn(base.transform, rendererName, actorRig, this.boneStructure.rigOrderedTransformArray, base.gameObject.layer);
        }
        this.renderers[global::ArmorModelSlot.Head] = actorMeshRenderer;
        for (global::ArmorModelSlot armorModelSlot = global::ArmorModelSlot.Feet; armorModelSlot < global::ArmorModelSlot.Head; armorModelSlot += 1)
        {
            this.renderers[armorModelSlot] = actorMeshRenderer.CloneBlank(armorModelSlot.GetRendererName());
        }
        for (global::ArmorModelSlot armorModelSlot2 = global::ArmorModelSlot.Feet; armorModelSlot2 < global::ArmorModelSlot.Head; armorModelSlot2 += 1)
        {
            ActorMeshRenderer actorMeshRenderer2 = this.renderers[armorModelSlot2];
            if (actorMeshRenderer2)
            {
                actorMeshRenderer2.renderer.enabled = base.enabled;
            }
        }
        global::ArmorModelSlotMask armorModelSlotMask     = (global::ArmorModelSlotMask)0;
        global::ArmorModelGroup    defaultArmorModelGroup = this.defaultArmorModelGroup;

        if (defaultArmorModelGroup)
        {
            global::ArmorModelSlot armorModelSlot3 = global::ArmorModelSlot.Feet;
            while (armorModelSlot3 < (global::ArmorModelSlot)4)
            {
                if (!memberMask.Contains(armorModelSlot3))
                {
                    goto IL_14D;
                }
                global::ArmorModel armorModel = memberMap.GetArmorModel(armorModelSlot3);
                if (!armorModel || !this.BindArmorModelCheckedNonNull(armorModel))
                {
                    goto IL_14D;
                }
                armorModelSlotMask |= armorModelSlot3.ToMask();
IL_16D:
                armorModelSlot3 += 1;
                continue;
IL_14D:
                global::ArmorModel armorModel2 = defaultArmorModelGroup[armorModelSlot3];
                if (armorModel2)
                {
                    this.BindArmorModelCheckedNonNull(armorModel2);
                    goto IL_16D;
                }
                goto IL_16D;
            }
        }
        else
        {
            foreach (global::ArmorModelSlot slot in memberMask.EnumerateSlots())
            {
                global::ArmorModel armorModel3 = memberMap.GetArmorModel(slot);
                if (armorModel3 && this.BindArmorModelCheckedNonNull(armorModel3))
                {
                    armorModelSlotMask |= slot.ToMask();
                }
            }
        }
        return(armorModelSlotMask);
    }