Not increasing Score integer
Hello, I'm creating a rhythm game using XNA. The problem is the
Score
increasing by value of earned score then to resets to 0
. Finally score is 0 too so, i don't have ideas what to do
6 Replies
Where's the
Score
variable declared?in the class Gameplay
And what is that class? Is the method you posted inside of that class?
Does anything else change the
Score
variable?
Does an instance of Gameplay
get destroyed or replaced at any point?nope
nothing
here is code for beginning of the class
Well, best advice I can give right now is to just debug this code
See when exactly the variable gets zeroed out
Update: moving variable to main File (Game1.cs) and make it static helped