public void RunTarget(
            System.Action <Equestribatch> _method,
            Color?clearColor     = null,
            EffectObject effect  = null,
            SamplerState sampler = null)
        {
            if (_inUse)
            {
                Systems.ConsoleWindow.WriteLine("Tried used Target Asset while it was already in use");
                return;
            }
            if (!_ready)
            {
                Systems.ConsoleWindow.WriteLine("Render Target is not ready for use");
                return;
            }
            BeginTarget();
            devRef.Clear((clearColor == null ? Color.Black : clearColor.Value));
            targetBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, sampler, null, null, effect);

            _method.Invoke(targetBatch);

            targetBatch.End();
            EndTarget();
        }
        public void RunTarget(
            System.Action<Equestribatch> _method,
            Color? clearColor = null,
            EffectObject effect = null,
            SamplerState sampler = null)
        {
            if (_inUse)
            {
                Systems.ConsoleWindow.WriteLine("Tried used Target Asset while it was already in use");
                return;
            }
            if (!_ready)
            {
                Systems.ConsoleWindow.WriteLine("Render Target is not ready for use");
                return;
            }
            BeginTarget();
            devRef.Clear((clearColor == null ? Color.Black : clearColor.Value));
            targetBatch.Begin(SpriteSortMode.Deferred,BlendState.AlphaBlend,sampler,null,null,effect);

            _method.Invoke(targetBatch);

            targetBatch.End();
            EndTarget();
        }
        public static void GenerateTextureObjectFromMethod(TargetObject input, out TextureObject output,string name, System.Action<Equestribatch> method, Color? color = null,EffectObject effect = null)
        {
            input.RunTarget(method,color,effect);

            output = new TextureObject(name, input.Texture,true);
        }
Ejemplo n.º 4
0
        public static void GenerateTextureObjectFromMethod(TargetObject input, out TextureObject output, string name, System.Action <Equestribatch> method, Color?color = null, EffectObject effect = null)
        {
            input.RunTarget(method, color, effect);

            output = new TextureObject(name, input.Texture, true);
        }