示例#1
0
    //public List<string> pL= new List<string>() {"EmptyGridSpace29", "EmptyGridSpace28", "EmptyGridSpace27"};

    public void SetSpace()
    {
        gameController.EnableAllBoardButtons();
        print("target: " + gameController.currenttargettool);
        print("space tag " + button.tag);
        //if (button.tag == gameController.currenttargettile || (button.tag == gameController.currenttargettool)){
        if (button.tag == gameController.currenttargettile)
        {
            button.image.sprite = gameController.GetToolSprite();
            TagSelectedTileWithToolType();
            if (gameController.phase == 1)
            {
                gameController.DisplayNofication_FirstToolPlacementConfirmation();
            }
            else if (gameController.phase == 2)
            {
                gameController.DisplayNofication_SecondToolPlacementConfirmation();
            }
            else if (gameController.phase == 3)
            {
                gameController.DisplayNofication_ThirdToolPlacementConfirmation();
            }
            //gameController.DisplayNofication_FirstToolPlacementConfirmation();

            gameController.StartTrialBtn.interactable = true;
            //gameController.EnableAllBoardButtons();
            gameController.ResetWaitingBools();
            gameController.waitingforstart = true;
        }
        else
        {
            //FIXME: UNCOMMENT IF SELECT CORRECT GRID SPACE MESSAGE NEEDED;
            //gameController.DisplayNofication_PlaceBlackSquare();
            //if tool placed == false (blue highlighter still there) display please display blue highlight notification otherwaise display press start notification
            if (gameController.waitingforstart == false)
            {
                gameController.DisplayNotification_BlueHiglightNotification();
            }
            else
            {
                gameController.DisplayNotification_PressStartBeforeAnotherToolPlacement();
            }
        }
    }