示例#1
0
        /// <summary>
        /// Adds a post-process effect chain to the end of the manager's effect chain list.
        /// </summary>
        /// <param name="chain">Effect chain which is to be added.</param>
        public override void AddEffectChain(PostProcessEffectChain chain)
        {
            if (chain == null)
            {
                throw new Exception("DefaultPostProcessManager.AddEffectChain(): null chain.");
            }

            //Add the chain to the manager.
            mEffectChains.Add(chain);
            //Register the OnChainChange method on the chain's ChainChanged event to receive
            //notifications when the state of the chain is changed.
            chain.ChainChanged += new PostProcessEffectChain.ChainChangedHandler(OnChainChange);
            //We have a new chain so we need to update the cache list.
            mNeedsUpdate = true;
        }
示例#2
0
        /// <summary>
        /// Removes a post-process effect chain from the manager's effect chain list.
        /// </summary>
        /// <param name="chain">
        /// Effect chain which is to be removed from the manager's effect chain list.
        /// </param>
        public override void RemoveEffectChain(PostProcessEffectChain chain)
        {
            if (chain == null)
            {
                throw new Exception("DefaultPostProcessManager.RemoveEffectChain(): null chain.");
            }

            if (mEffectChains.Remove(chain))
            {
                chain.ChainChanged -= new PostProcessEffectChain.ChainChangedHandler(OnChainChange);
                //Signal that we need to update the cache list.
                mNeedsUpdate = true;
            }
            else
            {
                throw new Exception("DefaultPostProcessManager.RemoveEffectChain(): chain not found.");
            }
        }
示例#3
0
 /// <summary>
 /// Called whenever one of the post-processing effect chains in the manager is enabled or
 /// disabled.
 /// </summary>
 /// <param name="chain">Chain which was enabled or disabled.</param>
 /// <param name="value">Whether the chain is now enabled or not.</param>
 public void OnChainChange(PostProcessEffectChain chain, bool value)
 {
     mNeedsUpdate = true;
 }
示例#4
0
 /// <summary>
 /// Removes a post-process effect chain from the manager's effect chain list.
 /// </summary>
 /// <param name="chain">
 /// Effect chain which is to be removed from the manager's effect chain list.
 /// </param>
 public abstract void RemoveEffectChain(PostProcessEffectChain chain);
示例#5
0
 /// <summary>
 /// Inserts a post-process effect chain into the manager's effect chain list.
 /// </summary>
 /// <param name="chain">Effect chain which is to be inserted.</param>
 /// <param name="pos">Position into which the effect chain is to be inserted.</param>
 public abstract void InsertEffectChain(PostProcessEffectChain chain, int pos);
示例#6
0
 /// <summary>
 /// Adds a post-process effect chain to the end of the manager's effect chain list.
 /// </summary>
 /// <param name="chain">Effect chain which is to be added.</param>
 public abstract void AddEffectChain(PostProcessEffectChain chain);