Ejemplo n.º 1
0
    private Equipment GetDefaultEquipment(EquipmentSlot slot)
    {
        Equipment equipment;
        bool      isDefault = true;

        switch (slot)
        {
        case (EquipmentSlot.PrimaryWeapon):
            equipment = (Weapon)primaryWeapon.Create(isDefault);
            break;

        case (EquipmentSlot.SecondaryWeapon):
            equipment = (Weapon)secondaryWeapon.Create(isDefault);
            break;

        case (EquipmentSlot.Support):
            equipment = (SupportEquipment)supportEquipment.Create(isDefault);
            break;

        case (EquipmentSlot.PrimaryMod):
            equipment = (ModEquipment)primaryMod.Create(isDefault);
            break;

        case (EquipmentSlot.SecondaryMod):
            equipment = (ModEquipment)secondaryMod.Create(isDefault);
            break;

        default: return(null);
        }
        equipment.Use();
        return(equipment);
    }