Description:
Tweak cursors.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -336,15 +336,6 | |||||
|
336 | } |
|
336 | } |
|
337 | } |
|
337 | } |
|
338 |
|
338 | ||
|
339 | // var preserveTool = WorldBuilder.CreateEntity(); |
|
||
|
340 | // WorldBuilder.SetComponent(preserveTool, new ToolComponent { Tool = Tool.Preserve }); |
|
||
|
341 | // WorldBuilder.SetComponent(preserveTool, new SelectedComponent {Type = SelectionType.Tool, selected = true}); |
|
||
|
342 | // |
|
||
|
343 | // var dezoneTool = WorldBuilder.CreateEntity(); |
|
||
|
344 | // WorldBuilder.SetComponent(dezoneTool, new ToolComponent { Tool = Tool.Dezone }); |
|
||
|
345 | // WorldBuilder.SetComponent(dezoneTool, new SelectedComponent {Type = SelectionType.Tool, selected = false}); |
|
||
|
346 |
|
|||
|
347 |
|
|||
|
348 | var gameEntity = WorldBuilder.CreateEntity(); |
|
339 | var gameEntity = WorldBuilder.CreateEntity(); |
|
349 |
|
340 | ||
|
350 | WorldBuilder.SetComponent(gameEntity, new GameStateComponent { isPlaying = false}); |
|
341 | WorldBuilder.SetComponent(gameEntity, new GameStateComponent { isPlaying = false}); |
@@ -37,7 +37,18 | |||||
|
37 | { |
|
37 | { |
|
38 |
|
38 | ||
|
39 | var cursorComponent = GetComponent<CursorComponent>(entity); |
|
39 | var cursorComponent = GetComponent<CursorComponent>(entity); |
|
40 | Tile.OutlineSquare(batch, cursorComponent.position.X, cursorComponent.position.Y, Color.Yellow); |
|
40 | switch (selectedTool) { |
|
|
41 | case Tool.Dezone: | ||
|
|
42 | Tile.OutlineSquare(batch, cursorComponent.position.X, cursorComponent.position.Y, Color.Red); | ||
|
|
43 | break; | ||
|
|
44 | case Tool.Preserve: | ||
|
|
45 | Tile.OutlineSquare(batch, cursorComponent.position.X, cursorComponent.position.Y, Color.Blue); | ||
|
|
46 | break; | ||
|
|
47 | default: | ||
|
|
48 | Tile.OutlineSquare(batch, cursorComponent.position.X, cursorComponent.position.Y, Color.Yellow); | ||
|
|
49 | break; | ||
|
|
50 | |||
|
|
51 | } | ||
|
41 | if(selectedTool == Tool.Tower) { |
|
52 | if(selectedTool == Tool.Tower) { |
|
42 | Tile.drawTileAt(batch, (int)cursorComponent.position.X, (int)cursorComponent.position.Y, 300, 2, 0.70f, new Color(1.0f, 1.0f, 1.0f, 0.5f)); |
|
53 | Tile.drawTileAt(batch, (int)cursorComponent.position.X, (int)cursorComponent.position.Y, 300, 2, 0.70f, new Color(1.0f, 1.0f, 1.0f, 0.5f)); |
|
43 | } |
|
54 | } |
You need to be logged in to leave comments.
Login now