コード例 #1
0
ファイル: RetroScreen.cs プロジェクト: RaulPB/videogames
        /// <summary>
        /// Creates a new SpacewarScreen
        /// </summary>
        public RetroScreen(Game game)
            : base(game)
        {
            //Retro
            backdrop = new SceneItem(game, new RetroStarfield(game));
            scene.Add(backdrop);

            bullets = new RetroProjectiles(game);
            ship1 = new Ship(game, PlayerIndex.One, new Vector3(-250, 0, 0), bullets);
            ship1.Radius = 10f;
            scene.Add(ship1);

            ship2 = new Ship(game, PlayerIndex.Two, new Vector3(250, 0, 0), bullets);
            ship2.Radius = 10f;
            scene.Add(ship2);

            sun = new Sun(game, new RetroSun(game), new Vector3(SpacewarGame.Settings.SunPosition, 0.0f));
            scene.Add(sun);

            scene.Add(bullets);

            paused = false;
        }
コード例 #2
0
        /// <summary>
        /// Creates a new SpacewarScreen
        /// </summary>
        public RetroScreen(Game game)
            : base(game)
        {
            //Retro
            backdrop = new SceneItem(game, new RetroStarfield(game));
            scene.Add(backdrop);

            bullets      = new RetroProjectiles(game);
            ship1        = new Ship(game, PlayerIndex.One, new Vector3(-250, 0, 0), bullets);
            ship1.Radius = 10f;
            scene.Add(ship1);

            ship2        = new Ship(game, PlayerIndex.Two, new Vector3(250, 0, 0), bullets);
            ship2.Radius = 10f;
            scene.Add(ship2);

            sun = new Sun(game, new RetroSun(game), new Vector3(SpacewarGame.Settings.SunPosition, 0.0f));
            scene.Add(sun);

            scene.Add(bullets);

            paused = false;
        }