This works:
public static class ScoreStorer{
public static int highScore {get;set;}
public static int score {get;set;}
}
but when i try to write a custom one that checks if high score needs to be replaced, it gives a stack error:
public static class ScoreStorer{
public static int highScore {get;set;}
public static int score
{
get{return score;}
set
{
if(score > value)
highScore = score;
score = value;
}
}
What did i do wrong?