I have this code in my game:
[code]CCSprite *background;
[self resetBackgrounds];
- (void)resetBackgrounds {
background = [CCSprite spriteWithSpriteFrameName:@"background.png"];
}[/code]
Now I want a class Graphics to handle this, so i move the function to Graphics.m and try to
access it by [Graphics resetBackgrounds];, but then it complains "Graphics may not respond to +resetBackground", and game crashes.
If I try to change it to + class method instead, it complains "Instance variable background accessed in class method", game runs but without a background.
So can I have this as instance? What am i missing?