Exemple #1
0
    void ExecuteMove()
    {
        //analytics
        if (GameGUI.analyticsGameCompleted.GetRollCount() <= GameData.GetNumPlayers())
        {
            GameGUI.analyticsInitialPathChosen.UpdatePathChosen(move.GetDestTile().name);
        }

        // destroy the lines and outlines
        GameData.GetCurrPlayer().DestroyLegalMoves();

        // start walking
        move.GetPiece().WalkToTile(move.GetDestTile());

        //hide move buttons
        GameGUI.GetMoveButton().gameObject.SetActive(false);
        GameGUI.GetNoMoveButton().gameObject.SetActive(false);
    }
Exemple #2
0
    void OnMouseDown()
    {
        // make line shine when mouse is clicked
        LightSaberFactor = 0.5f;

        //preview next tile
        GameGUI.PreviewMessageScreen(move.GetDestTile());

        //hide other lines
        foreach (Line line in hiddenLines)
        {
            line.gameObject.SetActive(false);
        }

        Button MoveButton   = GameGUI.GetMoveButton();
        Button NoMoveButton = GameGUI.GetNoMoveButton();

        MoveButton.onClick.AddListener(delegate { ExecuteMove(); });
        NoMoveButton.onClick.AddListener(delegate { ShowOtherLines(); });
    }