Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        m_difficultyLabel.text = ApplicationModel.GetDifficultyLabel(Mathf.FloorToInt(m_slider.value));
        m_slider.onValueChanged.AddListener(delegate {
            SetDifficultyLevel(Mathf.FloorToInt(m_slider.value));
        });

        m_sideSelectX.interactable = false;
        m_sideSet = true;
        ApplicationModel.playerStart = (int)ApplicationModel.PlayerStartState.Unset;

        m_sideSelectX.onClick.AddListener(delegate {
            SetPlayerSide(m_sideSelectX.GetComponentInChildren <Text>().text);
        });
        m_sideSelectO.onClick.AddListener(delegate {
            SetPlayerSide(m_sideSelectO.GetComponentInChildren <Text>().text);
        });

        m_startButton.onClick.AddListener(LoadGameBoard);
    }
Ejemplo n.º 2
0
 void SetDifficultyLevel(int level)
 {
     m_difficultyLabel.text      = ApplicationModel.GetDifficultyLabel(level);
     ApplicationModel.difficulty = (ApplicationModel.Difficulty)level;
 }