예제 #1
0
 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);
 }
예제 #2
0
 private void SetVisibleToPlayer(IVisible unit, List<IVisible> playerView)
 {
     //Debug.Assert(!playerView.Contains(unit));
     unit.GetVisibility().VisibleToPlayer = true;
     playerView.Add(unit);
 }
예제 #3
0
 private void SetVisibleToComputer(IVisible unit, List<IVisible> computerView)
 {
     //Debug.Assert(!computerView.Contains(unit));
     unit.GetVisibility().VisibleToComputer = true;
     computerView.Add(unit);
 }