回头启动后在控制台上留下的蓝线
因此,我有一个功能,可以使我使用WASD和箭头键在控制台上移动一个完整的Unicode字符。我使用此功能来更改此完整块字符的坐标:
public static void Render(int x, int y)
{
Console.Write("\b \b");
Console.SetCursorPosition(x, y);
Console.Write("\u2588");
}
它的工作原理,但是每当我将角色移至右侧时,它都会遗失一些奇怪的东西。看起来像这样: image
当我向右移动时,它在垂直蓝线后面留下我不明白为什么。在我离开的图像中,我将其移到右侧,向下移动,向右移动,重复。我想知道为什么会发生这种情况,以及是否有任何方法可以解决此问题。它只是图形上的,但它使我感到困扰。
So I have a function that lets me move a full block unicode character across the console with wasd and the arrow keys. I use this function to change the coordinates of this full block character:
public static void Render(int x, int y)
{
Console.Write("\b \b");
Console.SetCursorPosition(x, y);
Console.Write("\u2588");
}
It works as intended, but there's something weird left behind by it every time I move the character to the right. It looks like this: Image
It leaves behind vertical blue lines when I move it to the right and I don't understand why. In the image I left, I moved it to the right, moved down, moved it further right, repeat. I would like to know why this is happening, and if there is any way to fix this. It's only graphical but it bugs me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论