Пример #1
0
 public override void Initialize()
 {
   base.Initialize();
   this.combineEffect = new CombineEffect()
   {
     RedGamma = 1f
   };
   this.LevelManager.LevelChanged += (Action) (() =>
   {
     if (this.LevelManager.WaterType == LiquidType.Lava)
     {
       this.combineEffect.LeftFilter = new Matrix(1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
       this.combineEffect.RightFilter = new Matrix(0.0f, 0.0f, 0.0f, 0.0f, 1f, 0.0f, 0.0f, 0.0f, 1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
     }
     else
     {
       this.combineEffect.LeftFilter = new Matrix(0.2125f, 0.7154f, 0.0721f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
       this.combineEffect.RightFilter = new Matrix(0.0f, 0.0f, 0.0f, 0.0f, 0.2125f, 0.7154f, 0.0721f, 0.0f, 0.2125f, 0.7154f, 0.0721f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
     }
   });
 }
Пример #2
0
 protected override void LoadContent()
 {
   this.CombineEffect = new CombineEffect()
   {
     RedGamma = 1f
   };
 }