예제 #1
0
    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>();
    }
예제 #2
0
    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>();
    }