Exemplo n.º 1
0
 public override void Enter()
 {
     _oldState = _puzzle._state;
     Puzzle.State state = new Puzzle.State(_puzzle.PuzzleRowsOrCols);
     _puzzle._puzzleLayout.SetState(state);
     //AudioManager.Instance.PlayFadeIn(3, 0.5f, 0.0f, 0.8f, true);
     _puzzle.audioSource.PlayOneShot(_puzzle.audioHint);
     Debug.Log("GameState_SHOW_HINT");
 }
Exemplo n.º 2
0
    public override void Enter()
    {
        Debug.Log("GameState_ASTAR_SOLUTION");

        // ideally should fade out.
        _puzzle.buttonCancel.gameObject.SetActive(false);
        _puzzle.buttonHint.gameObject.SetActive(false);
        _puzzle.buttonStart.gameObject.SetActive(false);

        _puzzle.buttonNextAStar.gameObject.SetActive(true);
        _puzzle.buttonPrevAStar.gameObject.SetActive(true);
        _puzzle.buttonBack.gameObject.SetActive(true);

        _oldState = _puzzle._state;

        // set the initial state to the puzzle layout.
        if (_puzzle.m_astarSolved)
        {
            _puzzle._puzzleLayout.SetState(_puzzle.m_astarSolution[_puzzle.m_astarSolutionIndex].State);
        }
        m_index = 0;
    }