Esempio n. 1
0
 public Wall(string patchName) : base(patchName)
 {
     this.boundaryType = BOUNDARY_TYPE.Wall;
     this.wallType     = WALL_TYPE.Adiabat;
     this.gasPrt       = 1.0;
     this.steelPrt     = 1.0;
 }
Esempio n. 2
0
 public Wall(WALL_TYPE t, Cell parent)
 {
     type         = t;
     parent_cell  = parent;
     parent_cell2 = null;
     bVisible     = true;
     color        = Color.green;
 }
Esempio n. 3
0
        public Wall(WALL_TYPE type, Point location)
        {
            SetTopLevel(false);
            Size            = new Size(TanksGame.wallWidth, TanksGame.wallHeight);
            BackgroundImage = Properties.Resources.light_wall;
            AutoSize        = false;

            Location = location;
            Type     = type;
        }
Esempio n. 4
0
        public void addNeiborWalls(WALL_TYPE t, ref List <Wall> list)
        {
            if (t == WALL_TYPE.LEFT)
            {
                addTopWall(leftWall.parent_cell, ref list);
                addBottomWall(leftWall.parent_cell, ref list);
                addTopWall(leftWall.parent_cell2, ref list);
                addBottomWall(leftWall.parent_cell2, ref list);
                addRightWall(topWall.parent_cell, ref list);
                addRightWall(bottomWall.parent_cell2, ref list);
            }
            if (t == WALL_TYPE.RIGHT)
            {
                addTopWall(rightWall.parent_cell, ref list);
                addBottomWall(rightWall.parent_cell, ref list);
                addTopWall(rightWall.parent_cell2, ref list);
                addBottomWall(rightWall.parent_cell2, ref list);
                addRightWall(topWall.parent_cell, ref list);
                addRightWall(bottomWall.parent_cell2, ref list);
            }
            if (t == WALL_TYPE.TOP)
            {
                addTopWall(leftWall.parent_cell, ref list);
                addTopWall(rightWall.parent_cell2, ref list);
                addLeftWall(topWall.parent_cell, ref list);
                addRightWall(topWall.parent_cell, ref list);
                addLeftWall(topWall.parent_cell2, ref list);
                addRightWall(topWall.parent_cell2, ref list);
            }
            if (t == WALL_TYPE.BOTTOM)
            {
                addBottomWall(leftWall.parent_cell, ref list);
                addBottomWall(rightWall.parent_cell2, ref list);
                addLeftWall(bottomWall.parent_cell, ref list);
                addRightWall(bottomWall.parent_cell, ref list);
                addLeftWall(bottomWall.parent_cell2, ref list);
                addRightWall(bottomWall.parent_cell2, ref list);
            }

            return;
        }
Esempio n. 5
0
        private void DrawBaseWalls(Point baseLocation, WALL_TYPE wallType)
        {
            // Up walls
            Point wallSpot = new Point(baseLocation.X - wallWidth, baseLocation.Y - wallHeight);

            for (int i = 0; i < 4; i++)
            {
                var wall = new Wall(wallType, wallSpot);
                walls.Add(wall);
                Controls.Add(wall);
                wall.Show();

                wallSpot = new Point(baseLocation.X + i * wallWidth, baseLocation.Y - wallHeight);
            }

            // Left walls
            wallSpot = new Point(baseLocation.X - wallWidth, baseLocation.Y - wallHeight);
            for (int i = 0; i < 3; i++)
            {
                var wall = new Wall(wallType, wallSpot);
                walls.Add(wall);
                Controls.Add(wall);
                wall.Show();

                wallSpot = new Point(baseLocation.X - wallWidth, baseLocation.Y + i * wallHeight);
            }

            // Right walls
            wallSpot = new Point(baseLocation.X + 2 * wallWidth, baseLocation.Y - wallHeight);
            for (int i = 0; i < 3; i++)
            {
                var wall = new Wall(wallType, wallSpot);
                walls.Add(wall);
                Controls.Add(wall);
                wall.Show();

                wallSpot = new Point(baseLocation.X + 2 * wallWidth, baseLocation.Y + i * wallHeight);
            }
        }