Exemple #1
0
        private async void SelecionarCorPrograma_Click(object sender, RoutedEventArgs e)
        {
            MenuItem select = (MenuItem)sender;

            foreach (MenuItem i in Cores_mi.Items)
            {
                i.IsChecked = i == select;
            }
            //altera a cor
            await MudarCor.MudarAsync((string)select.Header);
        }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        GameObject pedraCorObject = GameObject.FindWithTag("pedra1");

        if (pedraCorObject != null)
        {
            pc1 = pedraCorObject.GetComponent <MudarCor>();
        }
        pedraCorObject = GameObject.FindWithTag("pedra2");
        if (pedraCorObject != null)
        {
            pc2 = pedraCorObject.GetComponent <MudarCor>();
        }
        pedraCorObject = GameObject.FindWithTag("pedra3");
        if (pedraCorObject != null)
        {
            pc3 = pedraCorObject.GetComponent <MudarCor>();
        }
    }