XNA content.load Dependancy
- by Richard
Quick question,
My project i'm building for test purposes is working fine but i have dependencies flying around everywhere due to the XNA framework.
In Update i have gametime passed everywhere... this is okay.
In Draw i have gametime & spritebatch passed everywhere... this is okay.
My issue is in the content.load textures/sounds/fonts.
I have them as public variables ie
Texture1 = Content.load(of texture2d)("Texture1")
I'm passing a 'Game1' pointer into the constructor of every new class being instantiated to gain access to these variables.
Am i missing an OOP trick to prevent me having to pass a pointer to 'game1' to every New class?