/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (MotorkiGame game = new MotorkiGame()) { game.Run(); } }
public MouseCursor(MotorkiGame game) { this.game = game; Visible = false; x = y = 0; InputEvents.MouseMoved += InputEvents_MouseMoved; InputEvents.MouseLeftChanged += InputEvents_MouseLeftChanged; }
/// <param name="key_repeat">time between key repeats (in milliseconds)</param> /// <param name="mousekey_repeat">time between key repeats (in milliseconds)</param> public InputEvents(MotorkiGame game, long key_repeat_edge, long key_repeat, long mousekey_repeat_edge, long mousekey_repeat) : base(game) { this.game = game; key_names = Enum.GetNames(typeof(Keys)); keypress_times = new long[key_names.Length]; for (int i = 0; i < keypress_times.Length; i++) keypress_times[i] = 0; InputEvents.key_repeat_edge = key_repeat_edge; InputEvents.key_repeat = key_repeat; InputEvents.mousekey_repeat_edge = mousekey_repeat_edge; InputEvents.mousekey_repeat = mousekey_repeat; MouseState ms = Mouse.GetState(); mouse_x = ms.X; mouse_y = ms.Y; mbtnLeft = 0; mbtnRight = 0; mbtnCenter = 0; }