lundi 13 février 2017

Updating a textblock with an int

Vote count: 0

Hello I am looking to add a score counter to a project I have been creating however I am having trouble updating my Textblock. My code is as follows;

        }
        int scoreCntr = 0;
        private  void KeepingScore(object sender, EventArgs e)
        {
            if (tagetTimer.IsEnabled && humanCaptured)
            {
                scoreCntr = scoreCntr + 1;
                Score.Text = scoreCntr.ToString();
                humanCaptured = false;
                human.IsHitTestVisible = true;
            }

        }
    }
}

Any help would be appreciated.

asked 26 secs ago

Let's block ads! (Why?)



Updating a textblock with an int

Aucun commentaire:

Enregistrer un commentaire