private void InstantiateGates(Int16 X, Int16 Z, Int16 lastX, Int16 lastZ)
        {
            Gates gates = new Gates(this.Game);

            this.gameField.CheckCoordinates(X, Z, CellState.Gate, lastX, lastZ, out this.currentBuildingVertices);
            gates.LoadTextures();
            gates.SetVertices(this.currentBuildingVertices);
            gates.Position = new Point(X, Z);
            this.listOfBuildings.Add(gates);
        }
Пример #2
0
        private void openCloseBtn_OnButtonClicked(Object o, String tag)
        {
            Gates     gates      = this.parent as Gates;
            GateState gatesState = gates.OpenCloseState;

            if (gatesState == GateState.Closed)
            {
                gates.OpenCloseState         = GateState.Empty;
                this.openCloseBtn.BtnTexture = this.openBtnTex;
            }
            else
            {
                gates.OpenCloseState         = GateState.Empty;
                this.openCloseBtn.BtnTexture = this.closeBtnTex;
            }
        }