void Start() { BrickArray = new GameObject[PlayAreaWidth, PlayAreaHeight]; Processors = GameObject.Find("Processors"); AddNewPlayBrick(); PlayAreaEdges = new PlayAreaEdges(); if (PlayAreaWidth % 2 == 0 && PlayAreaHeight % 2 == 0) { // Sets the vector cordinates for the edge of the play area. PlayAreaEdges.TopPlayAreaEdge = PlayAreaHeight / 2; PlayAreaEdges.BottomPlayAreaEdge = -(PlayAreaHeight / 2); PlayAreaEdges.RightPlayAreaEdge = (PlayAreaWidth / 2); PlayAreaEdges.LeftPlayAreaEdge = -(PlayAreaWidth / 2); } else { Debug.LogError("the area is not even"); } // // PositionAndBrickType = new Dictionary<int, Brick>(); // BrickList = new List<Brick>(); }
void Start() { BrickArray = new GameObject[PlayAreaWidth,PlayAreaHeight]; Processors = GameObject.Find("Processors"); AddNewPlayBrick(); PlayAreaEdges = new PlayAreaEdges(); if(PlayAreaWidth % 2 == 0 && PlayAreaHeight %2 == 0) { // Sets the vector cordinates for the edge of the play area. PlayAreaEdges.TopPlayAreaEdge = PlayAreaHeight/2; PlayAreaEdges.BottomPlayAreaEdge = -(PlayAreaHeight/2); PlayAreaEdges.RightPlayAreaEdge = (PlayAreaWidth/2); PlayAreaEdges.LeftPlayAreaEdge = -(PlayAreaWidth/2); } else Debug.LogError("the area is not even"); // // PositionAndBrickType = new Dictionary<int, Brick>(); // BrickList = new List<Brick>(); }