/// <summary> /// コンストラクタ(コピー) /// </summary> /// <param name="copy_src"></param> public Wall(Wall copy_src) { map_x = copy_src.map_x; map_y = copy_src.map_y; material = copy_src.material; panel = copy_src.panel; height = copy_src.height; direction_id = copy_src.direction_id; }
public Square(int map_x, int map_y, int height) { this.map_x = map_x; this.map_y = map_y; this.height = height; walls = new List <Wall> [WALL_DIRECTION]; for (var i = 0; i < WALL_DIRECTION; i++) { walls[i] = new List <Wall>(); } top_ground = new S3DPanel(new S3DPoint(BattleMap.SQUARE_SIZE * (map_x + 0.5), BattleMap.HIGHT_ONE_VALUE * height, BattleMap.SQUARE_SIZE * (map_y + 0.5)), new SDPoint(BattleMap.SQUARE_SIZE, BattleMap.SQUARE_SIZE), S3DPanel.Direction.Top); top_ground.SetColor(255, 255, 255, 255); top_ground.SetSpecularColor(255, 70, 70, 70); }
public Wall(int map_x, int map_y, int height, DirectionID direction_id) { this.map_x = map_x; this.map_y = map_y; this.height = height; this.direction_id = direction_id; var size = new SDPoint(BattleMap.SQUARE_SIZE, BattleMap.HIGHT_ONE_VALUE); panel = null; switch (direction_id) { case DirectionID.S: { var pos = new S3DPoint(BattleMap.SQUARE_SIZE * (map_x + 0.5), BattleMap.HIGHT_ONE_VALUE * (height + 0.5), BattleMap.SQUARE_SIZE * (map_y + 0.0)); panel = new S3DPanel(pos, size, S3DPanel.Direction.Wall_NS); } break; case DirectionID.E: { var pos = new S3DPoint(BattleMap.SQUARE_SIZE * (map_x + 1.0), BattleMap.HIGHT_ONE_VALUE * (height + 0.5), BattleMap.SQUARE_SIZE * (map_y + 0.5)); panel = new S3DPanel(pos, size, S3DPanel.Direction.Wall_EW); } break; case DirectionID.N: { var pos = new S3DPoint(BattleMap.SQUARE_SIZE * (map_x + 0.5), BattleMap.HIGHT_ONE_VALUE * (height + 0.5), BattleMap.SQUARE_SIZE * (map_y + 1.0)); panel = new S3DPanel(pos, size, S3DPanel.Direction.Wall_NS); } break; case DirectionID.W: { var pos = new S3DPoint(BattleMap.SQUARE_SIZE * (map_x + 0.0), BattleMap.HIGHT_ONE_VALUE * (height + 0.5), BattleMap.SQUARE_SIZE * (map_y + 0.5)); panel = new S3DPanel(pos, size, S3DPanel.Direction.Wall_EW); } break; } }