public static List <ExternalCustomisation> GetRandomUnderwearCustomisation(CharacterSettings data)
    {
        var RaceData = GetRaceData(data);
        List <ExternalCustomisation> externalCustomisations = new List <ExternalCustomisation>();

        void Logic(CustomisationAllowedSetting setting)
        {
            PlayerCustomisationData customizationToAdd       = setting.CustomisationGroup.PlayerCustomisations.PickRandom();
            ExternalCustomisation   newExternalCustomisation = new ExternalCustomisation();

            newExternalCustomisation.Key             = customizationToAdd.name;
            newExternalCustomisation.SerialisedValue = SerialiseCustomizationData(customizationToAdd);
            externalCustomisations.Add(newExternalCustomisation);
        }

        foreach (CustomisationAllowedSetting customisation in RaceData.Base.CustomisationSettings)
        {
            if (customisation.CustomisationGroup.name == "PlayerUnderShirt")
            {
                Logic(customisation);
            }
            if (customisation.CustomisationGroup.name == "PlayerUnderWear")
            {
                Logic(customisation);
            }
            if (customisation.CustomisationGroup.name == "PlayerSocks")
            {
                Logic(customisation);
            }
        }

        return(externalCustomisations);
    }
Ejemplo n.º 2
0
 public void GatherData()
 {
     PlayerCustomisationData.getPlayerCustomisationDatas(DataPCD);
     ClothingData.getClothingDatas(DataClothingData);
     ContainerData.getContainerData(DataContainerData);
     HeadsetData.getHeadsetData(DataHeadsetData);
     PlayerTextureData.getClothingDatas(DataRaceData);
 }
    public static CustomisationClass SerialiseCustomizationData(PlayerCustomisationData data)
    {
        var newcurrentSetting = new CustomisationClass();

        newcurrentSetting.Colour = "#" + ColorUtility.ToHtmlStringRGB(new Color(UnityEngine.Random.Range(0.1f, 1f),
                                                                                UnityEngine.Random.Range(0.1f, 1f), UnityEngine.Random.Range(0.1f, 1f), 1f));
        newcurrentSetting.SelectedName = data.Name;
        return(newcurrentSetting);
    }
Ejemplo n.º 4
0
    /// <summary>
    /// Used for generating [variant][animation frame] from a PlayerCustomisationData
    /// </summary>
    /// <returns>The sprite list</returns>
    public static List <List <SpriteHandler.SpriteInfo> > CompleteSpriteSetup(PlayerCustomisationData pcd)
    {
        if (pcd)
        {
            return(CompleteSpriteSetup(pcd.Equipped));
        }

        return(null);
    }
Ejemplo n.º 5
0
 public void GatherData()
 {
     PlayerCustomisationData.getPlayerCustomisationDatas(DataPCD);
     PlayerTextureData.getClothingDatas(DataRaceData);
     DefaultPlantData.getDatas(DataDefaultPlantData);
 }