Example #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="screen"></param>
 /// <param name="sector"></param>
 public SectorSprite(Surface screen, Sector sector)
     : base()
 {
     if (screen == null)
     {
         throw new ArgumentNullException("screen");
     }
     this.sector = sector;
     base.Surface = screen.CreateCompatibleSurface(128, 128);
     base.Surface.Fill(Color.FromArgb(0, 255, 128));
 }
Example #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sector"></param>
 /// <returns></returns>
 public SectorSprite GetSectorSprite(Sector sector)
 {
     SectorSprite sectSprite = null;
     foreach (SectorSprite s in this.backSprites)
     {
         if (s.Sector == sector)
         {
             sectSprite = s;
         }
     }
     return sectSprite;
 }
Example #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="direction"></param>
 /// <param name="sector"></param>
 public void SetNeighbors(Direction direction, Sector sector)
 {
     this.neighbors[(int)direction] = sector;
 }