public void HandleSingleVisibility(IVisible watcher, IVisible watched, List<IVisible> playerView) { Debug.Assert(watcher.Allegiance == Allegiance.Player); Debug.Assert(watched.Allegiance != Allegiance.Player); if (!watched.GetVisibility().VisibleToPlayer && CanSee(watcher, watched)) SetVisibleToPlayer(watched, playerView); }
private void SetVisibleToPlayer(IVisible unit, List<IVisible> playerView) { //Debug.Assert(!playerView.Contains(unit)); unit.GetVisibility().VisibleToPlayer = true; playerView.Add(unit); }
private void SetVisibleToComputer(IVisible unit, List<IVisible> computerView) { //Debug.Assert(!computerView.Contains(unit)); unit.GetVisibility().VisibleToComputer = true; computerView.Add(unit); }