Beispiel #1
0
        public Form_Game(Class_Bow bow, Form form, int Id_User)
        {
            InitializeComponent();

            this.bow = bow;

            aim = new Class_Aim(bow.X + bow.Width / 2 - 7, 430);

            form_Start = form;

            this.Id_User = Id_User;

            arrow = new Class_Arrow();

            frec = new int[9];

            for (int i = 1; i <= 8; i++)
            {
                frec[i] = 0;
            }

            rnd      = new Random();
            chickens = new List <Class_Chicken>();

            soundPlayer_Chicken_Hurt  = new SoundPlayer(Properties.Resources.Sound_chicken_Hurt);
            soundPlayer_Chicken_Spawn = new SoundPlayer(Properties.Resources.Shound_Chicken_Spawn);
        }
Beispiel #2
0
        private void button_Play_Click(object sender, EventArgs e)
        {
            Class_Bow bow = new Class_Bow(Properties.Resources.Bow, 200, 660);

            Form_Game form_Game = new Form_Game(bow, this, Id_User);

            Hide();
            form_Game.ShowDialog();
            Show();

            int nrMeciuri = (int)queriesTableAdapter.Get_NrMeciuri(Id_User);

            queriesTableAdapter.Update_NrMeciuri(nrMeciuri + 1, Id_User);
        }