Compare commits
2 Commits
9504c2236c
...
06eac128c2
Author | SHA1 | Date | |
---|---|---|---|
06eac128c2 | |||
437130ab55 |
@ -19,7 +19,7 @@ namespace SemiColinGames {
|
|||||||
// The number of total triangles drawn is one less than the number of edge points.
|
// The number of total triangles drawn is one less than the number of edge points.
|
||||||
readonly int[] indices = new int[(NUM_EDGE_VERTICES - 1) * 3];
|
readonly int[] indices = new int[(NUM_EDGE_VERTICES - 1) * 3];
|
||||||
|
|
||||||
Color color = Color.FromNonPremultiplied(new Vector4(0, 0, 1, 0.6f));
|
Color color = Color.FromNonPremultiplied(new Vector4(1, 0, 0, 0.5f));
|
||||||
|
|
||||||
public LinesOfSight(GraphicsDevice graphics) {
|
public LinesOfSight(GraphicsDevice graphics) {
|
||||||
for (int i = 0; i < MAX_NPCS; i++) {
|
for (int i = 0; i < MAX_NPCS; i++) {
|
||||||
@ -88,9 +88,7 @@ namespace SemiColinGames {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float tint = 0.6f - hitTime / 2;
|
coneVertices[index][i + 1] = new VertexPositionColor(new Vector3(closestHit, 0), color);
|
||||||
Color tinted = Color.FromNonPremultiplied(new Vector4(0, 0, 1, tint));
|
|
||||||
coneVertices[index][i + 1] = new VertexPositionColor(new Vector3(closestHit, 0), tinted);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,9 +86,7 @@ namespace SemiColinGames {
|
|||||||
|
|
||||||
// Draw lines of sight.
|
// Draw lines of sight.
|
||||||
basicEffect.Projection = camera.Projection;
|
basicEffect.Projection = camera.Projection;
|
||||||
if (Debug.Enabled) {
|
world.LinesOfSight.Draw(graphics, basicEffect);
|
||||||
world.LinesOfSight.Draw(graphics, basicEffect);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set up transformation matrix for drawing world objects.
|
// Set up transformation matrix for drawing world objects.
|
||||||
Matrix transform = Matrix.CreateTranslation(-camera.Left, -camera.Top, 0);
|
Matrix transform = Matrix.CreateTranslation(-camera.Left, -camera.Top, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user