Пример #1
0
        private void onRepeatedlyExecute()
        {
            IObject hotspot = _hitTest.ObjectAtMousePosition;

            if (hotspot == null)
            {
                turnOffObjectSpecificCursor();
                return;
            }
            IHasCursorComponent specialCursor = hotspot.GetComponent <IHasCursorComponent>();

            if (specialCursor == null)
            {
                turnOffObjectSpecificCursor();
                return;
            }
            var  currentCursor          = _state.Cursor;
            bool isCurrentSpecialCursor = currentCursor?.Properties.Bools.GetValue(SPECIAL_CURSOR_TAG) ?? false;

            if (!isCurrentSpecialCursor)
            {
                _lastCursor     = currentCursor;
                _cursorWasSaved = true;
                specialCursor.SpecialCursor.Properties.Bools.SetValue(SPECIAL_CURSOR_TAG, true);
                _state.Cursor = specialCursor.SpecialCursor;
            }
            _showingObjectSpecificCursor = true;
        }
Пример #2
0
        private void onRepeatedlyExecute()
        {
            IObject hotspot = _game.HitTest.ObjectAtMousePosition;

            if (hotspot == null)
            {
                turnOffObjectSpecificCursor();
                return;
            }
            IHasCursorComponent specialCursor = hotspot.GetComponent <IHasCursorComponent>();

            if (specialCursor == null)
            {
                turnOffObjectSpecificCursor();
                return;
            }
            if (_game.Input.Cursor != specialCursor.SpecialCursor)
            {
                _lastCursor        = _game.Input.Cursor;
                _game.Input.Cursor = specialCursor.SpecialCursor;
            }
            _showingObjectSpecificCursor = true;
        }
Пример #3
0
        private void onRepeatedlyExecute(object sender, AGSEventArgs e)
        {
            var     state   = _game.State;
            IObject hotspot = state.Room.GetObjectAt(_game.Input.MouseX, _game.Input.MouseY);

            if (hotspot == null)
            {
                turnOffObjectSpecificCursor();
                return;
            }
            IHasCursorComponent specialCursor = hotspot.GetComponent <IHasCursorComponent>();

            if (specialCursor == null)
            {
                turnOffObjectSpecificCursor();
                return;
            }
            if (_game.Input.Cursor != specialCursor.SpecialCursor)
            {
                _lastCursor        = _game.Input.Cursor;
                _game.Input.Cursor = specialCursor.SpecialCursor;
            }
            _showingObjectSpecificCursor = true;
        }