public Character(List <Bitmap> sprites, Maze maze, Point position) { //constructor this.maze = maze; this.position = position; this.sprites = sprites; sprite = sprites[0]; direction = Enumdir.Up; }
//when a new direction input has been detected it changes direction according to the latest keypress event. public void Changepacmandirection(Enumdir direction) { pacman.Direction = direction; }