在使用C#设计PacMan时需要帮助 [英] Need Help in Designing PacMan using C#

查看:95
本文介绍了在使用C#设计PacMan时需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我必须用C#开发吃豆游戏.这将是我使用C#的过程.在进行高级设计(即类图)时,我需要帮助,以继续我的工作.我想设计并进入编码阶段.
我对应该如何解决吃豆人和点子之间的冲突感到困惑.另外,我如何将其与持有玩家得分和等级信息的班级联系起来.
我能帮忙吗?

Hello,

I have to develop pacman game in C#. This will be my roject using C#. I need help in coming with high level design i.e. class diagram to continue my work. I want to design and jump into the coding stage.
I am confuse about how should I figure out the collision of pacman and dots. Also, how will I relate that to the class which hold the player score and level information.
Can I please get some help.

推荐答案

您需要什么类型的帮助?您要我们为您绘制图表吗?

:confused:
What type of help you need? Do you want us to draw diagrams for you ?

:confused:


首先对其进行编码,然后绘制类图.这样就完成了真正的软件. :-D

关于碰撞,您知道,只要两个对象(在您要尝试的区域)重叠,就会发生碰撞.
First code it and then the draw class diagrams. This way real software is done. :-D

As about collisions, you know, there''s a collision whenver two objects (areas in your case try) to overlap.


设计类似对象的基本方法是创建一个SYSTEM ,而不是为每个对象编写特定的代码.也就是说,创建一个幽灵类.创建一个点类.创建一个地图类.现在,幽灵只能在地图内移动.该点位于地图上,当吃豆人经过它时消失.您可以根据需要向每张地图添加尽可能多的鬼影.完成此操作后,您可以整天创建地图,并在其中放置点和幻影,它将继续起作用.
The basic way to design something like this, is to create a SYSTEM, not to write specific code for every object. That is, create a ghost class. Create a dot class. Create a map class. Now, the ghost can only move within the map. The dot sits on the map, and disappears when Pacman goes over it. You an add as many ghosts to each map as you like. Once this is done, you can create maps all day long, put dots and ghosts in them, and it will just continue to work.


这篇关于在使用C#设计PacMan时需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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