Exemplo n.º 1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            using (SplashScreen game = new SplashScreen())
            //   using (PracticeComponent game = new PracticeComponent())
            {
                try
                {
                    game.Run();
                }
                catch (Exception)
                {
                }

            }
            try
            {
                using (mainClass mgame = new mainClass())
                //   using (PracticeComponent game = new PracticeComponent())
                {
                    mgame.Run();
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Please check to see if all the resources are available, config file and/or Resources missing");
            }
        }
Exemplo n.º 2
0
        public mainClass()
        {
            graphics = new GraphicsDeviceManager(this);
             graphics.ToggleFullScreen();
            CameraPos = new Vector2(272, 5072);

            Bounds = new Vector2();

            Instance = this;

            Content.RootDirectory = "Content";
            //Random RNG = new Random();

            //for (int i = 0; i < 10; i++)
            //{

            //    if (RNG.Next(100)/(double)100 <= 0.3)
            //    {
            //        Console.WriteLine("Yes");
            //    }
            //    else
            //    {
            //        Console.WriteLine("No");
            //    }
            //}

            //            Environment.Exit(0);
        }
Exemplo n.º 3
0
        public NavigationSystem(mainClass p)
        {
            name = new string('c', 1);
            Parent = p;
            PathLines = new List<Line>();

            Uca = new UniformCostActuator();
            Time = 0;
            UpdateNo = 0;
        }
Exemplo n.º 4
0
Arquivo: Car.cs Projeto: fahadm/EVHDM
        private Car(Vector2 ScrSize)
        {
            CarPos.X = 0;
            CarPos.Y = 0;

            Bounds = ScrSize;
            Origin = new Vector2();
            Speed = 0.0f;
            Parent = mainClass.GetInstance();
            LastMove = new Vector2();

            KeyHandler = _KeyHandler;
        }
Exemplo n.º 5
0
Arquivo: Line.cs Projeto: fahadm/EVHDM
        public Line(Vector2 v0, Vector2 v1,Color c, mainClass Parent)
        {
            p0 = new Vector2();
            p1 = new Vector2();

            P0 = v0;

            P1 = v1;
            if (LineTexture == null)
            {
                LineTexture = new Texture2D(Parent.GraphicsDevice, 1, 1);
            }
            this.Parent = Parent;

            radius = 40;
            lineColor = c;
            SetLineAtrributes();

            angle = (float)Math.Atan2(P1.Y - P0.Y, P1.X - P0.X);
            length = Vector2.Distance(P0, P1);
        }