Exemple #1
0
 private DollRange(DollRangeType type, string varName)
 {
     Type    = type;
     Label   = Enum.GetName(typeof(DollColorType), type);
     VarName = varName;
     Id      = Shader.PropertyToID(varName);
 }
Exemple #2
0
        public static readonly DollRange Emission      = new DollRange(DollRangeType.Emission, "_Emmision"); // sic "Emmision"

        public static DollRange Get(DollRangeType type)
        {
            switch (type)
            {
            case DollRangeType.Metallic:
                return(Metallic);

            case DollRangeType.Smoothness:
                return(Smoothness);

            case DollRangeType.BodyArtAmount:
                return(BodyArtAmount);

            case DollRangeType.Emission:
                return(Emission);

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
Exemple #3
0
        public float GetRangeFloat(DollPartType partType, DollRangeType rangeType)
        {
            var setting = DollRange.Get(rangeType);

            return(Materials[partType].GetFloat(setting.Id));
        }
Exemple #4
0
        public void SetRangeFloat(DollPartType partType, DollRangeType rangeType, float value)
        {
            var setting = DollRange.Get(rangeType);

            Materials[partType].SetFloat(setting.Id, value);
        }