只写了这么点,也不知道是不是该用keyEventArgs
using System;
using System.Windows.Forms;
namespace 会动的方块
{
class Program
{
static void Main(string[] args)
{
int[,] map = new int[10, 10];
KeyEventArgs keyEventArgs = new KeyEventArgs(Keys1);
Block block1 = new Block();
Console.Read();
}
}
class Block
{
public int Block_x { get; set; } = 1;
public int Block_y { get; set; } = 1;
public void Drawer()
{
Console.Clear();
Console.SetCursorPosition(this.Block_x, this.Block_y);
Console.Write("■");
}
}
}
keyEventArgs里面全都是方法,没有事件。。。