示例#1
0
        static void Main(string[] args)
        {
            CORE myCore = new CORE();

            Tekstury tekstury = new Tekstury(myCore);

            #region Zmienne
            Pocisk     pocisk     = new Pocisk(tekstury.t["pocisk"], 0, 0, 10, 10, 0, 0, 1);
            Bron       bron       = new Bron(pocisk, tekstury.t["bron"], 1);
            Samolot    gracz      = new Samolot(10, 10, 30, 30, tekstury.t["samolot"], bron);
            Przeciwnik przeciwnik = new Przeciwnik(tekstury.t["przeciwnik"], pocisk, 1000, 300, 50, 40);
            Sonda      sonda      = new Sonda(tekstury);

            #endregion

            while (myCore.bRunning)
            {
                myCore.Events();
                myCore.Clear();

                gracz.Wyswietlanie(myCore);
                przeciwnik.Wyswietlanie(myCore);
                sonda.Wyswietlanie(myCore);
                sonda.Przesun(gracz);
                przeciwnik.Przesun(gracz);



                myCore.Present();
            }
        }
示例#2
0
        public Samolot(double x, double y, double w, double h, IntPtr tekstura, Bron bron)
        {
            this.x = x;
            this.y = y;
            this.w = w;
            this.h = h;

            zycie                  = 10;
            vy                     = 0;
            vx                     = 0;
            silnik                 = 0;
            przyspieszenie         = 0.1;
            przyspieszenieWzlotowe = 0.001;
            maxsilnik              = 5;
            maxkontup              = 45;
            kont                   = 0;
            masa                   = 20;
            this.tekstura          = tekstura;
            this.bron              = bron;
            masa                   = bron.masa;
            zwrotnosc              = 1;
            t_Strzal               = new Taimer(bron.pocisk.tears);
        }