public Map(Game g,int x=5,int y=5) { game = g; MapX = x; MapY = y; if (MapX < 1 || MapX > 9) MapX = 5; if (MapY < 1 || MapY > 9) MapY = 5; MapR = new Rectangle[MapX, MapY]; MapR = new Rectangle[MapX,MapY]; cmd = new MapMover[MapX, MapY]; bo = new bool[MapX, MapY]; bo1 = new bool[MapX, MapY]; for (int i = 0; i < MapX; ++i) for (int j = 0; j < MapY; ++j) MapR[i, j] = RectXY(i,j); for (int i = 0; i < MapX; ++i) for (int j = 0; j < MapY; ++j) cmd[i, j] = new MapMover("", i, j); SetCenter(); MW2 = 0; MH2 = 0; W = 0; LT = new AnimPoint(GetPointW(0, 0)); RB = new AnimPoint(GetPointW(5, 5)); Resize(0); }
public Player(int id,string nm,string st,int x0,int y0) { name = nm; str = st; loc = 100 + 10 * x0 + y0; X = x0; Y = y0; if (game != null) ToPT = PT = game.map.GetPoint(X, Y); HP = -1; Alive = false; PlayerID = id; Spark = new MapMover("",x0,y0); color = colorO; ff = new Font("Georgia", Map.W / 10, FontStyle.Bold); }
public Player(int id, string nm, string st, int x0, int y0) { name = nm; str = st; loc = 100 + 10 * x0 + y0; X = x0; Y = y0; if (game != null) { ToPT = PT = game.map.GetPoint(X, Y); } HP = -1; Alive = false; PlayerID = id; Spark = new MapMover("", x0, y0); color = colorO; ff = new Font("Georgia", Map.W / 10, FontStyle.Bold); }
public Map(Game g, int x = 5, int y = 5) { game = g; MapX = x; MapY = y; if (MapX < 1 || MapX > 9) { MapX = 5; } if (MapY < 1 || MapY > 9) { MapY = 5; } MapR = new Rectangle[MapX, MapY]; MapR = new Rectangle[MapX, MapY]; cmd = new MapMover[MapX, MapY]; bo = new bool[MapX, MapY]; bo1 = new bool[MapX, MapY]; for (int i = 0; i < MapX; ++i) { for (int j = 0; j < MapY; ++j) { MapR[i, j] = RectXY(i, j); } } for (int i = 0; i < MapX; ++i) { for (int j = 0; j < MapY; ++j) { cmd[i, j] = new MapMover("", i, j); } } SetCenter(); MW2 = 0; MH2 = 0; W = 0; LT = new AnimPoint(GetPointW(0, 0)); RB = new AnimPoint(GetPointW(5, 5)); Resize(0); }