如何移动PAC-MAN [英] How to move PAC-MAN

查看:76
本文介绍了如何移动PAC-MAN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hiiiiiii

我正在尝试用视觉基础制作程序
通过此程序,我将能够在图片中移动图像已保存在文本文件(Y,X)中的带有协调器的表单上的框

I am trying to make a program with visual basic 
by this this program i will be able to move an image in picture box at form with coordinators that is already saved in text file (Y ,X)

我不想成为一个懒惰的学生,所以我只想让您向我展示如何自己完成这项功课的方法,我将在我的功课中解释我的需求.

i don't want to be a lazy student so i asked you only to show me the way to do efforts to achieve this homework by myself ,i will explain what i need in my homework so  i want "if it is possible "

尽我所能

谢谢再次 

thanks  again 

图片框包含我必须移动的图片(吃豆人)和动作命令保存在名为PacMan.txt的文本文件中.命令文件的示例

the picture box contain a picture (pac man) that i have to move and the movement  commands are saved in a text file called PacMan.txt  an example of the command file

(PacMan.txt)

(PacMan.txt)

15 x 20

D12 U3 R12

D12 U3 R12

U12 D12 L12 R5

U12 D12 L12 R5

U5

  U:上. U12命令意味着12个单位上升.

  U: Up. The U12 command means that 12 units go up.

&D:向下.吃豆人D5命令下降5个单位

 D: Down. Pac-Man with D5 command goes down 5 units

.....

Pac-Man的图片大小和每一步的坐标将被写入一个名为 的文件中. PacManO.txt. ,通过这种方式,第一行将成为pacman尺寸:

Pac-Man's picture size and The coordinate of each step will be writed in a file called  PacManO.txt. ,the first line will be the pacman dimension by this way :

40 x 40

80 640

80 680

80 720

80 760

80 720

80 680

80 640

80 600

80 560

80 520

80 480

80 440

80400

80 36

 

我可以根据需要设置pacman的尺寸,但我可以还必须注意表单的尺寸

i can make the dimension of pacman as i want but i  have also to Pay attention to the dimensions of the form which is

(N * PictureBox_Width + Form_State_Border_Quality)X(M * PictureBox_High + Form_Dikey_Border_Thickness).

 (N * PictureBox_Width+Form_State_Border_Quality) X (M*PictureBox_High+Form_Dikey_Border_Thickness).

 为此所需的命令是

 The command required for this  is 

Me.ClientSize =新大小(N * PictureBox_Width,M * PictureBox_High).

Me.ClientSize = New Size (N *PictureBox_Width, M *PictureBox_High).

我不知道如何使用此代码"

"I don’t know how to use this code"

当我们运行程序时,pacman会沙沙作响,并且每次运行程序pacman都会从不同的点开始移动,此后他将开始执行移动.命令在文本文件中,直到到达终点为止 将要停止.

when we run the program the pacman will move in rustle way and every time we run the program pacman will start moving from different point and after that he will start to execute the moving  commands in the text file until he reach the final point he is going to stop.

我不知道需求代码是什么以及如何使用"

"I don’t know  what is the requirement codes and how to use"

 如果我可以玩(跑步),我将获得奖金. pacman移动时发出的音乐.

 i will take bonus if i could play(run)  music while pacman is moving.

我不知道要求代码是什么?

"I don’t know  what is the requirement codes"

PacManO.txt文件的第一行是所使用的PictureBox的尺寸.下一行是PictureBox的左上角,表单的左上角是水平和垂直方向上的位置.

The first line of the PacManO.txt file is the dimensions of the PictureBox that is used.The next lines are the top left corner of the PictureBox,  the top left of the form is the Position in the horizontal and vertical directions,.

0,0点形式的左上角.

Top left corner of the form 0,0 Point.

如果吃豆人在移动时面对任何墙壁,他反映了他的运动方式

if Pac-Man while moving faces any wall  he reflect the way of his movement

我不知道要求代码是什么"

"I don’t know  what is the requirement codes"

推荐答案

Hi

如果您在Google中输入"VB.NET弹跳球",您将获得许多您想要的东西的例子.

If you type 'VB.NET bouncing ball' into Google, you will get many many examples of the type of thing you seem to be wanting.


这篇关于如何移动PAC-MAN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆