Exemplo n.º 1
0
    /// <summary>
    /// Gets the wardrobeRecipes from this collections arbitrary recipes list
    /// </summary>
    public List <UMATextRecipe> GetArbitraryRecipes(DynamicCharacterSystem dcs)
    {
        List <UMATextRecipe> recipesWeGot = new List <UMATextRecipe>();

        for (int i = 0; i < arbitraryRecipes.Count; i++)
        {
            recipesWeGot.Add(dcs.GetRecipe(arbitraryRecipes[i], true));
        }
        return(recipesWeGot);
    }
Exemplo n.º 2
0
    /// <summary>
    /// Gets the recipe names for the given race from the WardrobeCollection
    /// </summary>
    public List <string> GetRacesRecipeNames(string race, DynamicCharacterSystem dcs)
    {
        var           recipesToGet = wardrobeCollection[race];
        List <string> recipesWeGot = new List <string>();

        for (int i = 0; i < recipesToGet.Count; i++)
        {
            recipesWeGot.Add(recipesToGet[i].recipe);
        }
        return(recipesWeGot);
    }
Exemplo n.º 3
0
    /// <summary>
    /// Gets the wardrobeRecipes for the given race from the WardrobeCollection
    /// </summary>
    public List <UMATextRecipe> GetRacesRecipes(string race, DynamicCharacterSystem dcs)
    {
        var recipesToGet = wardrobeCollection[race];
        List <UMATextRecipe> recipesWeGot = new List <UMATextRecipe>();

        for (int i = 0; i < recipesToGet.Count; i++)
        {
            recipesWeGot.Add(dcs.GetRecipe(recipesToGet[i].recipe, true));
        }
        return(recipesWeGot);
    }
Exemplo n.º 4
0
 public void TakePhotos()
 {
     if (doingTakePhoto == false)
     {
         doingTakePhoto = true;
         if (avatarToPhoto == null)
         {
             if (Debug.isDebugBuild)
             {
                 Debug.Log("You need to set the Avatar to photo in the inspector!");
             }
             doingTakePhoto = false;
             return;
         }
         if (destinationFolder == "")
         {
             if (Debug.isDebugBuild)
             {
                 Debug.Log("You need to set a DestinationFolder in the inspector!");
             }
             doingTakePhoto = false;
             return;
         }
         dcs = UMAContext.Instance.dynamicCharacterSystem as DynamicCharacterSystem;
         if (!autoPhotosEnabled)
         {
             bool canPhoto = SetBestRenderTexture();
             if (canPhoto)
             {
                 photoName = photoName == "" ? avatarToPhoto.activeRace.name + Path.GetRandomFileName().Replace(".", "") : photoName;
                 StartCoroutine(TakePhotoCoroutine());
             }
             else
             {
                 if (Debug.isDebugBuild)
                 {
                     Debug.Log("Unknown RenderTexture Error...");
                 }
                 doingTakePhoto = false;
                 return;
             }
         }
         else
         {
             Dictionary <string, List <UMATextRecipe> > recipesToPhoto = dcs.Recipes[avatarToPhoto.activeRace.name];
             basePhotoTaken = false;
             StartCoroutine(TakePhotosCoroutine(recipesToPhoto));
         }
     }
 }
Exemplo n.º 5
0
 public void OnEnable()
 {
     m_Object         = new SerializedObject(target);
     dCharacterSystem = m_Object.targetObject as DynamicCharacterSystem;
 }