예제 #1
0
        private void DrawLastActionInfo(SpriteBatch b)
        {
            if (PlayerHelpers.IsPlayerOffline(PlayerId))
            {
                return;
            }

            var font = Game1.smallFont;

            var yPos   = _locationPos.Y + font.LineSpacing + GenericHeightSpacing;
            var action = PlayerStateWatcher.GetLastActionForPlayer(PlayerId);

            var text = action.GetDisplayText();

            var textWidth = font.MeasureString(text).X;

            var xPos = _inventory.xPositionOnScreen + (_inventory.width * 3 / 4);

            _lastActionPos = new Vector2(xPos - (textWidth / 2), yPos);

            b.DrawString(font, text, _lastActionPos, Color.Black);

            var lastActionTimeText = action.GetWhenDisplay();

            var timeTextWidth = font.MeasureString(lastActionTimeText).X;

            yPos += font.LineSpacing;

            _lastActionTimePos = new Vector2(xPos - (timeTextWidth / 2), yPos);

            b.DrawString(font, lastActionTimeText, _lastActionTimePos, Color.Black);
        }
예제 #2
0
        public ModEntryHelper(IMonitor monitor, IModHelper modHelper)
        {
            var showIcon = new ShowPlayerIconHandler(monitor, modHelper);

            var playerWatcher = new PlayerStateWatcher(modHelper);

            // var logHandler = new LogInputHandler(monitor, modHelper);
        }