示例#1
0
        public static string GetComposeString(AttributeCompositionMode mode, params string[] parameters)
        {
            switch (mode)
            {
            case AttributeCompositionMode.Overwrite: return(string.Format("{0} = {1};", parameters));

            case AttributeCompositionMode.Add: return(string.Format("{0} += {1};", parameters));

            case AttributeCompositionMode.Multiply: return(string.Format("{0} *= {1};", parameters));

            case AttributeCompositionMode.Blend: return(string.Format("{0} = lerp({0},{1},{2});", parameters));

            default: throw new System.NotImplementedException("VFXBlockUtility.GetComposeFormatString() does not implement return string for : " + mode.ToString());
            }
        }
示例#2
0
        public static string GetNameString(AttributeCompositionMode mode)
        {
            switch (mode)
            {
            case AttributeCompositionMode.Overwrite: return("Set");

            case AttributeCompositionMode.Add: return("Add");

            case AttributeCompositionMode.Multiply: return("Multiply");

            case AttributeCompositionMode.Blend: return("Blend");

            default: throw new ArgumentException();
            }
        }