Esempio n. 1
0
 public void MainTimertick()
 {
     if (Game.gui.FLineBar.Value > 0)
     {
         Game.gui.FLineBar.Increment(-1);
     }
     if (Game.gui.ReelBar.Value > 0)
     {
         Game.gui.ReelBar.Increment(-1);
     }
     if (Game.gui.FLineBar.Value > 98)
     {
         Game.gui.EventsBox.Items.Add(Player.getPlayer().NickName + " порвал леску");
         Game.isFishAttack = false;
         Game.CastPoint.Y  = 0;
         Item.LureInv.Remove(Player.getPlayer().lure);
         Player.getPlayer().lure = null;
     }
     if (Game.gui.ReelBar.Value > 98)
     {
         Game.gui.EventsBox.Items.Add(Player.getPlayer().NickName + " сломал удочку");
         Pictures.road     = Pictures.brokenRoad;
         Game.isFishAttack = false;
         Item.RoadInv.Remove(Player.getPlayer().proad);
         Game.CastPoint.Y = 800;
         //Item.RoadInv.Remove(Player.proad);
         Player.getPlayer().proad = null;
     }
     Game.ozeroForm.Refresh();
     if (Game.CastPoint.X > 1049)
     {
         Game.CastPoint.X = 1048;
     }
     if (Game.CastPoint.X < 0)
     {
         Game.CastPoint.X = 1;
     }
     if (Game.nettingY == 550 && Game.isFishAttack && Game.CastPoint.Y > 600)
     {
         if (Game.gui.EventsBox.Items.Count > 5)
         {
             Game.gui.EventsBox.Items.Clear();
         }
         Game.gui.FLineBar.Value = 0;
         Game.gui.ReelBar.Value  = 0;
         LVL.setCurrentFish();
         Game.gui.EventsBox.Items.Add(Fish.CFish.ToString());
     }
     Game.nettingY = 800;
 }
Esempio n. 2
0
        public UI(LVL lvl)
        {
            InitializeComponent();
            SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint |
                     ControlStyles.UserPaint, true);
            eatingBar.Value = Player.GetPlayer().Satiety;
            _presenter      = new GUIPresenter(this);
            _presenter.Run(); //Mistake
            _sound = new SounderPresenter(this, lvl);
            _sound.Run();

            MoneyLValue    = Player.GetPlayer().Money;
            timeLabel.Text = Game.GetGame().Time.ToString();

            Game.GetGame().HoursInc += GUI_HoursInc;
            Player.GetPlayer().EventHistoryUpdated += ShowLastEvent;
            Player.GetPlayer().SatietyUpdated      += SatietyUpdated;
        }