Ejemplo n.º 1
0
 public void AddElement(Element ele)
 {
     if (ele is P1Player)
     {
         this.play1 = ele as P1Player;
     }
     else if( ele is Wall)
     {
         this.wallList.Add(ele as Wall);
     }
     else if (ele is Grass)
     {
         this.grassList.Add(ele as Grass);
     }
     else if( ele is Steel)
     {
         this.steelList.Add(ele as Steel);
     }
     else if (ele is Water)
     {
         this.waterList.Add(ele as Water);
     }
     else if ( ele is Missile)
     {
         this.missileList.Add(ele as Missile);
     }
 }
Ejemplo n.º 2
0
 public void AddElement(Element ele)
 {
     if (ele is P1Player)
     {
         this.play1 = ele as P1Player;
     }
     else if (ele is Wall)
     {
         this.wallList.Add(ele as Wall);
     }
     else if (ele is Grass)
     {
         this.grassList.Add(ele as Grass);
     }
     else if (ele is Steel)
     {
         this.steelList.Add(ele as Steel);
     }
     else if (ele is Water)
     {
         this.waterList.Add(ele as Water);
     }
     else if (ele is Missile)
     {
         this.missileList.Add(ele as Missile);
     }
 }