Exemplo n.º 1
0
 public abstract Unit CreateUnit(string type, string name, string id, int width, int height, int xPos, int yPos, int xv, int yv, UnitsObservers ub);
Exemplo n.º 2
0
 public override Unit CreateUnit(string type, string name, string id, int width, int height, int xPos, int yPos, int xv, int yv, UnitsObservers ub)
 {
     if (type == "Block")
     {
         return(new Block(name, id, width, height, xPos, yPos, xv, yv, ub));
     }
     else if (type == "Ball")
     {
         return(new Ball(name, id, width, height, xPos, yPos, xv, yv, ub));
     }
     return(null);
 }
Exemplo n.º 3
0
 public Unit createUnit(string type, string name, string id, int width, int height, int xPos, int yPos, int xv, int yv, UnitsObservers ub)
 {
     return(CreateUnit(type, name, id, width, height, xPos, yPos, xv, yv, ub));
 }