예제 #1
0
 public Boom(Thickness p, Grid back, Booms _father, int t)
 {
     tag        = t;
     pos        = p;
     background = back;
     father     = _father;
 }
예제 #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if ((int)Start.Tag == 1)
            {
                background.Children.Remove(endmessage);
                player_1.Margin = new Thickness(0, 483, 0, 0);
                enemies1.Destroy();
                timer.Dispose();
            }
            background.Children.Add(player_1);
            player_bullets  = new Bullets(background, player_1);
            player_1.Tag    = "N";
            enemies1        = new Enemies(background, null, scoreboard);
            booms           = new Booms(background);
            background.Tag  = 1;
            player1         = new Player(10, 10, player_1, HPinfo, player_bullets, enemies1, booms);
            enemies1.player = player1;

            background.Children.Remove(Start);
            background.Children.Remove(Exit);
            background.Children.Remove(Picture);

            timer          = new Timer(10);
            timer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
            timer.Interval = 10;
            timer.Enabled  = true;
        }
예제 #3
0
 public Player(int hp, int Mhp, Image img, Label hpb, Bullets playerb, Enemies enemyb, Booms b) : base(hp, Mhp, img)
 {
     booms          = b;
     hplabel        = hpb;
     player_bullets = playerb;
     enemies        = enemyb;
 }