Exemplo n.º 1
0
        protected override void OnUpdate()
        {
            var position = Engine.Mouse.Position;

            menu.OnMouse(position);

            var mouseStatus = Engine.Mouse.GetMouseButtonState(MouseButton.ButtonLeft);

            if (mouseStatus == ButtonState.Push)
            {
                menu.Click(position, this);
            }
        }
Exemplo n.º 2
0
        protected override void OnUpdate()
        {
            var position = Engine.Mouse.Position;

            panel.OnMouse(position);
            menu.OnMouse(position);

            var mouseStatus = Engine.Mouse.GetMouseButtonState(MouseButton.ButtonLeft);

            if (mouseStatus == ButtonState.Push)
            {
                panel.OnClick(position);
                menu.Click(position, this);
                _powerPanel.UpdateValue();
                _moneyPanel.SetValue(GameData.PlayerData.Money);
            }
        }
Exemplo n.º 3
0
        protected override void OnUpdate()
        {
            if (frameCount > Engine.TargetFPS / 4)
            {
                frameCount = 0;
                _ranchPanel.Animetion();
            }
            frameCount++;
            var position = Engine.Mouse.Position;

            menu.OnMouse(position);
            _ranchPanel.OnMouse(position);

            var mouseStatus = Engine.Mouse.GetMouseButtonState(MouseButton.ButtonLeft);

            if (mouseStatus == ButtonState.Push)
            {
                menu.Click(position, this);
                _ranchPanel.OnClick(position);
                _powerPanel.UpdateValue();
                _moneyPanel.SetValue(GameData.PlayerData.Money);
            }
        }