public static void SetObjectManager(ObjectManager om) { manager = om; }
public void Initialize(GraphicsDevice Device, ScreenManager manager) { GraphicsDevice = Device; spriteBatch = new SpriteBatch(Device); cam = new Camera(new Vector2(520, 440), new Rectangle(0, 0, 800, 600)); _lightMap = new LightMap(Device); MapManager.LoadMaps(Device); //map = MapManager.GetMapByID(0); objectManager = new ObjectManager(map); objectManager.SetLight(_lightMap); pm = new ParticleManager(); TextManager.SetUp(ContentInterface.LoadFont("font")); Player.font = ContentInterface.LoadFont("font"); font = ContentInterface.LoadFont("font"); bar = ContentInterface.LoadTexture("White"); expBorder = ContentInterface.LoadTexture("ExpBar"); crosshair = ContentInterface.LoadTexture("Crosshair"); _spriteEffect = ContentInterface.LoadShader("ShadowEffect"); _spriteEffect.CurrentTechnique = _spriteEffect.Techniques["Sprite"]; _manager = manager; _mapMutex = new System.Threading.Mutex(); input = new InputManager(); WorldController.SetObjectManager(objectManager); WorldController.SetGame(this); WorldController.Start(); _GUIOverlay = new UI.GUIScreen(); manager.AddScreen(_GUIOverlay); }