C# Dart Oyunu
C# Dart Oyunu Uygulaması
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } int yer, x, y; private void button1_Click(object sender, EventArgs e) { pictureBox2.Location= new Point(450,78); Random rnd = new Random(); yer = rnd.Next(7, 12); x = pictureBox2.Location.X; y = pictureBox2.Location.Y; timer1.Start(); } int puan=0; private void timer1_Tick(object sender, EventArgs e) { if (yer == 7) { x-=5; if (x < 272) { label1.Text = "Toplam Puan...:"+(puan+=7); timer1.Stop(); } } if (yer == 8) { x -= 5; if (x < 245) { label1.Text = "Toplam Puan...:" + (puan += 8); timer1.Stop(); } } if (yer == 9) { x -= 5; if (x < 223) { label1.Text = "Toplam Puan...:" + (puan += 9); timer1.Stop(); } } if (yer == 10) { x -= 5; if (x < 200) { label1.Text = "Toplam Puan...:" + (puan += 10); timer1.Stop(); } } if (yer == 11) { x -= 5; if (x <182) { label1.Text = "Toplam Puan...:" + (puan += 11); timer1.Stop(); } } if (yer == 12) { x -= 5; if (x < 167) { label1.Text = "Toplam Puan...:" + (puan +=12); timer1.Stop(); } } pictureBox2.Location =new Point(x, y); } } } |
Dosya boyutu : 466 Kb Virustotal Sonuçları : 0 / 53 Temiz Rar şifresi : www.technoprogram.com C# Dart Oyunu Projesini İndir İndirmek için tıklayın