예제 #1
0
파일: Form1.cs 프로젝트: sanjatas/Bumper
        public Bumper()
        {
            InitializeComponent();
            Kontroli = Resources.kontrolii;
            flag = false;
            zvukON = Resources.soundON;
            zvukOFF = Resources.soundOFF;
            CarsDoc = new CarsDoc();
            LentiDoc = new LentiDoc();
            DupkiDoc = new DupkiDoc();
            generirajKola = 0;
            poeni = 0;
            level = 1;
            sekundi = 0;
            //asvalt
            img = Properties.Resources.Road2;
            biImg = new Bitmap(img);
            tba = new TextureBrush(biImg);
            clicked = true;

            sounds = new Sounds();

            DoubleBuffered = true;
            random = new Random();
            zgolemiLvl = false;
            bestScore = 0;
            eksplozija = Properties.Resources.explosion_;
            TextReader tr = new StreamReader("highscores.txt");
            lbHighScore.Text = tr.ReadLine() + "pts";
        }
예제 #2
0
파일: Form1.cs 프로젝트: sanjatas/Bumper
 private void pbTryAgain_Click(object sender, EventArgs e)
 {
     TextReader tr = new StreamReader("highscores.txt");
     lbHighScore.Text = tr.ReadLine() + "pts";
     CarsDoc = new CarsDoc();
     generirajKola = 0;
     poeni = 0;
     level = 1;
     jas = new Budala(new Point(135, 450));
     timer1.Interval = 80;
     timer1.Start();
     timer2.Start();
     sekundi = 0;
     //  lblSekundi.Text = "0 sec";
     lblLevel.Text = "1";
     zgolemiLvl = false;
     ekplodiraj = false;
     sounds.gameOver.Stop();
 }