Description:
Add missing files, oops.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r192:98aab60ddc49 -

@@ -0,0 +1,11
1
2 using Microsoft.Xna.Framework;
3
4 using Encompass;
5
6 namespace isometricparkfna.Components {
7
8 public struct AreaComponent : IComponent {
9 public Vector2[] squares;
10 }
11 }
@@ -0,0 +1,39
1
2 using Microsoft.Xna.Framework;
3 using Microsoft.Xna.Framework.Graphics;
4
5 using isometricparkfna.UI;
6 using isometricparkfna.Components;
7
8 using Encompass;
9 using SpriteFontPlus;
10
11 namespace isometricparkfna.Renderers
12 {
13 public class AreaRenderer : GeneralRenderer
14 {
15 private SpriteBatch batch;
16 private SpriteFont font;
17
18
19 public AreaRenderer(SpriteBatch batch, SpriteFont font)
20 {
21 this.batch = batch;
22 this.font = font;
23 }
24
25
26 public override void Render()
27 {
28
29 var budgetWindow = new BudgetWindow(new Budget { }, this.font, 0, 0);
30
31 foreach (ref readonly var entity in ReadEntities<AreaComponent>())
32 {
33 var areaComponent = GetComponent<AreaComponent>(entity);
34 Tile.DrawOutlinedSquares(batch, areaComponent.squares, Color.Teal);
35
36 }
37 }
38 }
39 }
@@ -4,10 +4,12
4 4 using Encompass;
5 5
6 6 using isometricparkfna.Messages;
7 using isometricparkfna.Components;
7 8
8 9 namespace isometricparkfna.Engines {
9 10
10 11 [Receives(typeof(ToggleWindowMessage), typeof(ToggleVisibilityMessage))]
12 [Reads(typeof(AreaComponent))]
11 13 class GameBridgeEngine : Engine
12 14 {
13 15
@@ -51,6 +53,20
51 53 }
52 54 }
53 55
56 foreach (ref readonly var entity in ReadEntities<AreaComponent>())
57 {
58 game.in_zone = false;
59 var areaComponent = GetComponent<AreaComponent>(entity);
60 foreach (var square in areaComponent.squares)
61 {
62 if (game.mouseGrid == square)
63 {
64 game.in_zone = true;
65 }
66 }
67
68 }
69
54 70 }
55 71 }
56 72
@@ -58,9 +58,12
58 58
59 59 Simulation simulation;
60 60
61 Vector2 mouseGrid;
61 public Vector2 mouseGrid;
62 62 Vector2 original_point;
63 63
64 //for now
65 public bool in_zone;
66
64 67 private ImGuiRenderer _imGuiRenderer;
65 68 private DebugWindow debugWindow;
66 69
@@ -723,7 +726,10
723 726 String status_left = "";
724 727 if (MathUtils.Between(this.mouseGrid.X, -1, this.simulation.map.MapWidth) && MathUtils.Between(this.mouseGrid.Y, -1, this.simulation.map.MapHeight))
725 728 {
726 status_left = String.Format("{0:},{1:} {2}", this.mouseGrid.X, this.mouseGrid.Y, this.simulation.map.cells[(int)this.mouseGrid.X][(int)this.mouseGrid.Y].status);
729 status_left = String.Format("{0:},{1:} {2} ({3})", this.mouseGrid.X, this.mouseGrid.Y,
730 this.simulation.map.cells[(int)this.mouseGrid.X][(int)this.mouseGrid.Y].status,
731 this.in_zone ? "Contracted" : "Unzoned"
732 );
727 733 }
728 734
729 735 String header_left = String.Format("${0:}|{1:} \ue124", this.simulation.money, this.simulation.map.tree_count);
You need to be logged in to leave comments. Login now