public GameScene()
            : base()
        {
            enemy_spawn_timer = new Timer(3000);

            player = new Player(Resources.GetTexture("Ship"), new Vector2(100, 100), 5);

            background1 = new ScrollingBackground(new Vector2(-100,-100), 40, new Sprite(Resources.GetTexture("StarWars")));
            background2 = new ScrollingBackground(new Vector2(0,0), 30, new Sprite(Resources.GetTexture("StarWars")));

            Game1.camera.setZoom(1.5f);

            Vector2 offset = new Vector2(Game1.screen_size.Width, Game1.screen_size.Height) * 0.5f;

            Game1.camera.PositionOffset = offset;
            Game1.camera.setOffset(offset);
        }
Exemple #2
0
        public override void Start()
        {
            enemy_spawn_timer = new Timer(3000);

            player = new Player(Resources.GetTexture("Ship"), new Vector2(100, 100), 5);
            background1 = new ScrollingBackground(new Vector2(-100, -100), 40, new Sprite(Resources.GetTexture("StarWars")));
            background2 = new ScrollingBackground(new Vector2(0, 0), 30, new Sprite(Resources.GetTexture("StarWars")));

            camera.setZoom(1.0f);

            Vector2 offset=new Vector2(Game1.screen_size.Width, Game1.screen_size.Height) * 0.5f;

            camera.PositionOffset = offset;
            camera.setOffset(offset);

            hud = new HUDScene();

            SceneSys.OpenScene(hud);
        }