A block type that modifies how vision is occluded. It always reports that it blocks vision, and exposes a VisionMode based on its Phase: null for phase 0, Umbra for phase 1, and Spotlight for phase 2 and above.
namespace BlockParty;
/// <summary>
/// Shade block — obscures the player's line of sight, escalating by phase. Otherwise a normal block
/// (moves, bounces, phases when all four sides are pressed):
/// <list type="bullet">
/// <item>Phase 0: no effect.</item>
/// <item>Phase 1: casts an opaque umbra over everything directly behind it from the player's
/// position (like a solid obstacle).</item>
/// <item>Phase 2: inverts — covers almost the whole arena EXCEPT a narrow widening cone (less than 90°)
/// between the block and the player, so only the corridor toward the block is visible.</item>
/// </list>
/// The cover itself is drawn by the stage's shared <see cref="VisionOccluder"/>; this class only
/// reports the current mode (which the stage feeds to the occluder each frame).
/// </summary>
public sealed class BlockShade : Block
{
public override bool BlocksVision => true;
public override VisionBlockMode? VisionMode => Phase switch
{
0 => null,
1 => VisionBlockMode.Umbra,
_ => VisionBlockMode.Spotlight,
};
}