Exemple #1
0
 public DebugLayer(float defaultLineWidth, Renderer.ViewportPolicy viewportPolicy, SpriteFont font)
     : base(new Renderer(1, viewportPolicy, Renderer.RenderOptions.Canvas))
 {
     this.defaultLineWidth = defaultLineWidth;
     this.font = font;
     this.Color = new Dictionary<string, Color>(StringComparer.OrdinalIgnoreCase);
     this.entityVectors = new Dictionary<Entity, Dictionary<string, Vector2>>();
     this.entityLabels = new Dictionary<Entity, Dictionary<string, EntityLabel>>();
 }
        public RendererCanvasTest(Renderer renderer, SpriteFont font)
        {
            this.renderer = renderer;
            this.renderOptions = renderer.Options | Renderer.RenderOptions.Canvas;
            this.policy = default(Renderer.ViewportPolicy);
            this.renderer.ChangeOptions(this.policy, this.renderOptions);
            this.font = font;

            this.timer = 0;
            this.resolutionIndex = 0;

            this.keyboard = Keyboard.GetState();
            this.GenerateColors();
        }
Exemple #3
0
 public EntityLayer(float width, float height, Renderer renderer, Integrator integrator)
     : base(width, height)
 {
     this.renderer = renderer;
     this.integrator = integrator;
     this.AddComponent(this.renderer);
     this.AddComponent(this.integrator);
     this.Properties = new PropertyCollection();
     this.Properties.Objects["editable"] = "EntityLayer";
     this.Properties.Ints["tiles"] = 1;
     this.Properties.Ints["entities"] = 1;
     this.Properties.Floats["Width"] = width;
     this.Properties.Floats["Height"] = height;
 }
Exemple #4
0
 public EntityLayer(Renderer renderer, Integrator integrator)
     : this(PhantomGame.Game.Width, PhantomGame.Game.Height, renderer, integrator)
 {
 }
Exemple #5
0
 public static void AddDebugLayer(this GameState state, float defaultLineWidth, Renderer.ViewportPolicy viewportPolicy, SpriteFont font)
 {
     state.AddComponent(new DebugLayer(defaultLineWidth, viewportPolicy, font));
 }
Exemple #6
0
 public EditorState(GameState editing)
 {
     this.Propagate = false;
     this.Transparent = true;
     renderer = new Renderer(1, Renderer.ViewportPolicy.Fit, Renderer.RenderOptions.Canvas);
     Editor = new Editor(editing);
     AddComponent(Editor);
     AddComponent(renderer);
 }
Exemple #7
0
 public RenderLayer(Renderer renderer)
     : this(PhantomGame.Game.Width, PhantomGame.Game.Height, renderer)
 {
 }
Exemple #8
0
 public RenderLayer(float width, float height, Renderer renderer)
     : base(width, height)
 {
     this.renderer = renderer;
     this.AddComponent(this.renderer);
 }