public ScreenManager(AbyssGame g) { Game = g; gameScreen = new GameScreen(Game); ScreenStack = new Stack<Screen>(); ScreenStack.Push(gameScreen); }
public ParticleEntity(Screen.GameScreen screen, string effectName) : base(screen) { abyss = screen.Game; gameScreen = screen; Effect = abyss.Content.Load<ParticleEffect>(effectName).DeepCopy(); Effect.Initialise(); Effect.LoadContent(abyss.Content); }
public GameScreen(AbyssGame game) { Game = game; world = new World(new Vector2(0, GRAVITY)); UnitConverter.SetDisplayUnitToSimUnitRatio(PIXELS_PER_METER); Camera = new FarseerCamera(ref AbyssGame.spriteBatch, AbyssGame.Assets, Game.GraphicsDevice, AbyssGame.ScreenWidth, AbyssGame.ScreenHeight, ref world, PIXELS_PER_METER); Camera.viewMode = FarseerCamera.ViewMode.Scroll; GameObjects = new List<GameObject>(5); //probably a good starting number SpawnController = new SpawnController(this); Camera.subjetDistanceToScreenEdge = 700; explosionParticleEffect = new ParticleEntity(this, "BasicFireball"); addObject(explosionParticleEffect); osd = new OSD(); osd.LoadContent(); rt = new RenderTarget2D(Game.GraphicsDevice, Game.GraphicsDevice.PresentationParameters.BackBufferWidth, Game.GraphicsDevice.PresentationParameters.BackBufferHeight); }