Exemplo n.º 1
0
 public ScreenManager(AbyssGame g)
 {
     Game = g;
     gameScreen = new GameScreen(Game);
     ScreenStack = new Stack<Screen>();
     ScreenStack.Push(gameScreen);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
        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);
        }