示例#1
0
 public Collision(Element[,] mapElements)
 {
     this.mapElements = mapElements;
     int width = Data.GetWindowWidth();
     int height = Data.GetWindowHeight();
     this.render = new ConsoleRender(width, height);
 }
示例#2
0
        public Menu()
        {
            int width = Data.GetWindowWidth();
            int height = Data.GetWindowHeight();
            this.render = new ConsoleRender(width, height);

            // set text menu position
            this.rowText = height / 2;
            this.colText = width / 2;
            this.choiseRow = this.rowText; // set default choice position
            this.rowDistance = 2; // distance between printed rows

            isExit = false;
            this.levelNumber = 0;
        }
示例#3
0
        public GameEngine(uint levelNumber)
        {
            int width = Data.GetWindowWidth();
            int height = Data.GetWindowHeight();
            this.render = new ConsoleRender(width, height);

            this.level = Data.GetLevel(levelNumber);
            havePlayerFire = false;
            isExit = false;
            this.enemys = new List<Tank>();
            FillStartEnemyPositions();
            createEnemyCallCount = 0;
            rand = new Random();
            this.playerMisals = new List<Fire>();
            this.enemyMisals = new List<Fire>();
            this.collision = new Collision(level);
            this.enemyOnLevel = 20;
            this.isEscapePressed = false;
            this.enemyPlayCount = 0;
            this.enemyNumber = 0;
        }
        private static void Initialisation()
        {
            int dimention = Data.GetElementDimention();
            int height = Data.GetWindowHeight();

            minRow = 2;
            rowsByDimention = (height - minRow) / dimention;
            colsByDimention = (Data.GetWindowWidth() - 1) / dimention;

            maxRow = height;
            minCol = 0;
            maxCol = Data.GetWindowWidth() - 1;

            currentElementRow = minRow;
            currenElementCol = minCol;

            isExit = false;

            currentElementType = ElementType.Empty;

            changeDistance = Data.GetElementDimention();

            render = new ConsoleRender(Data.GetWindowWidth(), height);

            currentElementType = ElementType.Braket;
            element = new Element(currentElementType, minRow, minCol);
            ShowElement();
        }