Example #1
0
 /// <summary>
 /// Creates a new skybox
 /// </summary>
 /// <param name="skyboxTexture">the name of the skybox texture to use</param>
 public Skybox(Game1 game, Camera camera, String skyboxName)
     : base(game)
 {
     this.camera = camera;
     this.game = game;
     skyboxModel = LoadModel(game.Content, skyboxName, out skyboxTextures);
 }
Example #2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Example #3
0
 public Record(Game1 game, Vector3 position)
     : base(game)
 {
     this.game = game;
     this.position = position;
     theModel = game.Content.Load<Model>("Models\\Record\\record");
     scale = 10f;
 }
Example #4
0
 public Planet(Game1 game, Vector3 position, float scale, String planetName)
     : base(game)
 {
     this.game = game;
     this.scale = scale;
     this.position = position;
     theModel = game.Content.Load<Model>("Models\\Planets\\" + planetName);
 }
Example #5
0
 public AsteroidField(Game1 game, Camera c)
     : base(game)
 {
     this.game = game;
     currentCamera = c;
     asteroidField = new BoundingBox(new Vector3(-1200, -300, 400), new Vector3(1200, 300, 1000));
     generateAsteroidField();
 }
Example #6
0
 public SoundPlayer(Game1 game, String settingsFile)
     : base(settingsFile + ".xgs")
 {
     this.game = game;
     waveBank = new WaveBank(this, settingsFile + ".xwb");
     soundBank = new SoundBank(this, settingsFile + ".xsb");
     musicCategory = base.GetCategory("Sound");
     initialize();
 }
Example #7
0
 public Terrain(Game1 game)
     : base(game)
 {
     this.game = game;
     effect = game.Content.Load<Effect>("TerrainEffect");
     Texture2D heightMap = game.Content.Load<Texture2D>("Levels\\Level2\\heightmap");
     LoadHeightData(heightMap);
     LoadContent();
     offset = new Vector3(0, 0, 0);
 }
Example #8
0
        public MusicPlayer(Game1 game, String settingsFile, int totalTracks)
            : base(settingsFile+ ".xgs")
        {
            this.game = game;
            this.totalTracks = totalTracks;
            waveBank = new WaveBank(this, settingsFile+ ".xwb");
            soundBank = new SoundBank(this, settingsFile+ ".xsb");
            musicCategory = base.GetCategory("Music");

            initialize();
        }
Example #9
0
 public Asteroid(Game1 game, Vector3 position, float scale, Vector3 driection, Vector3 velocity)
     : base(game)
 {
     this.game = game;
     theModel = game.Content.Load<Model>("Models\\Asteroid\\LargeAsteroid");
     this.direction = Quaternion.CreateFromYawPitchRoll(direction.X, direction.Y, direction.Z);
     this.velocity = velocity;
     this.position = position;
     this.scale = scale;
     mass = 10 * scale;
 }
Example #10
0
        public Control(Game1 g, Player p, Camera current, Boolean pad)
            : base(g)
        {
            game = g;

            player = p;
            gamepad = pad;
            acceleratingFor = 0;
            lastMouse = Mouse.GetState();
            lastKeyboard = Keyboard.GetState();

            currentCam = current;

            Initialize();
        }
Example #11
0
        public Player(Game1 game, Vector3 p, float s)
            : base(game)
        {
            this.game = game;
            MAX_SPEED = 10;
            theModel = game.Content.Load<Model>("Models\\Player\\ship");
            player_position = p;
            scale = s;

            funnelSmokePlume = new SmokePlumeParticleSystem(game, game.Content);
            funnelSmokePlume.DrawOrder=4;
            game.Components.Add(funnelSmokePlume);

            explosion = new ExplosionParticleSystem(game, game.Content);
            explosion.DrawOrder = 4;

            explosionSmoke = new ExplosionSmokeParticleSystem(game, game.Content);
            explosionSmoke.DrawOrder = 4;

            playerSfx = game.getSoundPlayer();
            trainSoundCue =  playerSfx.getCue("trainsSound");
            playerSfx.playCue(trainSoundCue);
            trainSoundCue.SetVariable("TrainSpeed", 0);
        }
Example #12
0
 public TerrainCollision(Game1 game, Terrain terrain)
     : base(game)
 {
     this.game = game;
     this.terrain = terrain;
 }
Example #13
0
 public Collision(Game1 game)
     : base(game)
 {
     this.game = game;
 }