LinesOfSight: make vision cones red
This commit is contained in:
parent
437130ab55
commit
06eac128c2
@ -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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user