Browse Source

LinesOfSight: make vision cones red

master
Colin McMillen 4 years ago
parent
commit
06eac128c2
  1. 6
      Shared/LinesOfSight.cs

6
Shared/LinesOfSight.cs

@ -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);
}
}

Loading…
Cancel
Save