예제 #1
0
 /// <summary>
 /// Initializes the specified assets.
 /// </summary>
 /// <param name="assets">The assets.</param>
 /// <exception cref="System.InvalidOperationException">Disappear Material needs a valid texture.</exception>
 public override void Initialize(AssetsContainer assets)
 {
     try
     {
         this.DiffuseMap = assets.LoadAsset <Texture2D>(this.diffuseMapPath);
         this.OpacityMap = assets.LoadAsset <Texture2D>(this.opacityMapPath);
         this.BurnMap    = assets.LoadAsset <Texture2D>(this.burnMapPath);
     }
     catch (Exception)
     {
         throw new InvalidOperationException("DisappearMaterial needs a valid texture.");
     }
 }
        /// <summary>
        /// Initializes the specified assets.
        /// </summary>
        /// <param name="assets">The assets.</param>
        public override void Initialize(AssetsContainer assets)
        {
            base.Initialize(assets);

            if (this.EnvironmentMap == null && !string.IsNullOrEmpty(this.environmentMapPath))
            {
                this.EnvironmentMap = assets.LoadAsset <TextureCube>(this.environmentMapPath);
            }
        }
예제 #3
0
 public override void Initialize(AssetsContainer assets)
 {
     try
     {
         this.DiffuseMap = assets.LoadAsset <Texture2D>(this.diffuseMapPath);
     }
     catch (Exception e)
     {
         throw new InvalidOperationException("MyMaterial needs a valid texture.");
     }
 }
예제 #4
0
 public override void Initialize(AssetsContainer assets)
 {
     try
     {
         this.DiffuseMap = assets.LoadAsset<Texture2D>(this.diffuseMapPath);
     }
     catch (Exception e)
     {
         throw new InvalidOperationException("MyMaterial needs a valid texture.");
     }
 }
예제 #5
0
 /// <summary>
 /// Initializes the specified assets.
 /// </summary>
 /// <param name="assets">The assets.</param>
 /// <exception cref="System.InvalidOperationException">Disappear Material needs a valid texture.</exception>
 public override void Initialize(AssetsContainer assets)
 {
     try
     {
         this.DiffuseMap = assets.LoadAsset<Texture2D>(this.diffuseMapPath);
         this.OpacityMap = assets.LoadAsset<Texture2D>(this.opacityMapPath);
         this.BurnMap = assets.LoadAsset<Texture2D>(this.burnMapPath);
     }
     catch (Exception)
     {
         throw new InvalidOperationException("DisappearMaterial needs a valid texture.");
     }
 }
        /// <summary>
        /// Initializes the specified assets.
        /// </summary>
        /// <param name="assets">The assets.</param>
        public override void Initialize(AssetsContainer assets)
        {
            base.Initialize(assets);

            if (this.EnvironmentMap == null && !string.IsNullOrEmpty(this.environmentMapPath))
            {
                this.EnvironmentMap = assets.LoadAsset<TextureCube>(this.environmentMapPath);
            }
        }