LinesOfSight: make vision cones red

This commit is contained in:
Colin McMillen 2020-03-09 14:59:14 -04:00
parent 437130ab55
commit 06eac128c2

View File

@ -19,7 +19,7 @@ namespace SemiColinGames {
// 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];
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) {
for (int i = 0; i < MAX_NPCS; i++) {
@ -88,9 +88,7 @@ namespace SemiColinGames {
}
}
float tint = 0.6f - hitTime / 2;
Color tinted = Color.FromNonPremultiplied(new Vector4(0, 0, 1, tint));
coneVertices[index][i + 1] = new VertexPositionColor(new Vector3(closestHit, 0), tinted);
coneVertices[index][i + 1] = new VertexPositionColor(new Vector3(closestHit, 0), color);
}
}