public string SourceModifierToString( LayeredBlending.SourceModifier modifier )
		{
			for ( int i = 0; i < LayeredBlending.sourceModifiers.Length; i++ )
			{
				if ( LayeredBlending.sourceModifiers[ i ].Type == modifier )
				{
					return LayeredBlending.sourceModifiers[ i ].Name;
				}
			}

			return string.Empty;
		}
		public string BlendModeToString( LayeredBlending.BlendMode blendMode )
		{
			for ( int i = 0; i < LayeredBlending.blendModes.Length; i++ )
			{
				if ( LayeredBlending.blendModes[ i ].Type == blendMode )
				{
					return LayeredBlending.blendModes[ i ].Name;
				}
			}

			return string.Empty;
		}
示例#3
0
        private LayeredBlending CreateOrRetrieveSubRenderState(ScriptTranslator translator)
        {
            LayeredBlending layeredBlendState = null;
            //check if we already create a blend srs
            SubRenderState subState = translator.GetGeneratedSubRenderState(Type);

            if (subState != null)
            {
                layeredBlendState = subState as LayeredBlending;
            }
            else
            {
                SubRenderState subRenderState = CreateOrRetrieveInstance(translator);
                layeredBlendState = (LayeredBlending)subRenderState;
            }

            return(layeredBlendState);
        }
示例#4
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LayeredBlending obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }