Exemplo n.º 1
0
        public Map(Game game, string MapName)
            : base(game)
        {
            this.Game1 = (Game1)(game);

            this.MapName = MapName;
        }
Exemplo n.º 2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemplo n.º 3
0
        public MapPart(Game game, Vector3 Position, string Type, Texture2D Texture)
            : base(game)
        {
            this.Game1 = (Game1)(game);

            this.Position = Position;

            this.Type = Type;

            this.Texture = Texture;
        }
Exemplo n.º 4
0
        public Camera(Car car, Game1 game1)
        {
            this.car = car;

            this.Game1 = game1;

            this.angleX = 0;

            this.angleZ = 0;

            //MainView = Matrix.CreateLookAt(new Vector3(0, -10, 10), Vector3.Zero, Vector3.Up); //(0, 0, 5) !!!

            //-MathHelper.PiOver4 - 0.2f
        }
Exemplo n.º 5
0
        public Object(Game game, Vector3 Position, Model Model, float Density, float Scale, Vec2[] CollisionBody)
            : base(game)
        {
            this.Game1 = (Game1)(game);

            this.Position = Position;

            this.Model = Model;

            this.Density = Density;

            this.Scale = Scale;

            this.CollisionBody = CollisionBody;
        }
Exemplo n.º 6
0
        public static void ArrayVectors(Vector2[] Array, Game1 Game1)
        {
            var vectors = Array.Concat(Array.Take(1)).Select((v) => new VertexPositionColor(new Vector3(v.X, v.Y, 0.2f), Microsoft.Xna.Framework.Color.Red)).ToArray();

            var Effect = Game1.basicEffect;

            Effect.World = Matrix.Identity;

            Effect.View = Game1.camera.GetBetterView();//Matrix.CreateScale(1) * Matrix.CreateLookAt(Vector3.Backward, Vector3.Zero, Vector3.Up);

            Effect.Projection = Game1.camera.GetProjection();//Matrix.CreateOrthographic(Game1.GraphicsDevice.Viewport.Width, Game1.GraphicsDevice.Viewport.Height, 0.1f, 10);

            Effect.VertexColorEnabled = true;

            foreach (EffectPass pass in Effect.CurrentTechnique.Passes)
            {
                pass.Apply();

                Game1.GraphicsDevice.DrawUserPrimitives(PrimitiveType.LineStrip, vectors, 0, vectors.Length - 1);
            }

            Effect.VertexColorEnabled = false;
        }
Exemplo n.º 7
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }