Ejemplo n.º 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (ParagliderSimulator game = new ParagliderSimulator())
     {
         game.Run();
     }
 }
Ejemplo n.º 2
0
        public Terrain(ParagliderSimulator game, GraphicsDevice device, float terrainScale, float fogStart, float fogEnd, Texture2D heightmap, Texture2D grassTexture, Texture2D sandTexture,
                       Texture2D rockTexture, Texture2D snowTexture, Texture2D treeMap, Texture2D grassMap, Texture2D treeTexture, ContentManager Content, Texture2D updraftMap, Texture2D dirtTexture,
                       Texture2D fieldTextureMap)
        {
            this.game         = game;
            this.device       = device;
            this.heightmap    = heightmap;
            this.grassTexture = grassTexture;
            this.sandTexture  = sandTexture;
            this.rockTexture  = rockTexture;
            this.snowTexture  = snowTexture;
            this.terrainScale = terrainScale;
            this.fogStart     = fogStart;
            this.fogEnd       = fogEnd;
            this.treeTexture  = treeTexture;
            this.dirtTexture  = dirtTexture;
            LoadHeightData(heightmap);
            LoadUpdraftData(updraftMap);
            LoadFieldTextureData(fieldTextureMap);
            SetUpVertices();
            SetUpIndices();
            CalculateNormals();
            CopyToBuffers();

            wind     = new WindStrengthSin();
            animator = new TreeWindAnimator(wind);
            LoadTreeGenerators(Content);
            NewTree();

            List <Vector3> treeList = GenerateTreePositions(treeMap, vertices);

            CreateBillboardVerticesFromList(treeList);
            //List<Vector3> grassList = GenerateTreePositions(grassMap, vertices);
            bbEffect = Content.Load <Effect>(@"Shader/bbEffect");
        }
Ejemplo n.º 3
0
 public Gps(Game game)
     : base(game)
 {
     this.game = (ParagliderSimulator)game;
 }
Ejemplo n.º 4
0
 public Player(ParagliderSimulator game)
     : base(game)
 {
     this.game = game;
 }
Ejemplo n.º 5
0
 public Target(Game game, Vector3 position)
     : base(game)
 {
     this.game     = (ParagliderSimulator)game;
     this.position = position;
 }