游戏andoneandall什么意思思

励志成为b站 不要脸系 文字冒险类up。。。over,从此我就不是我了,下次不要找我买节操,售罄!!
新朋友看到的话注意了!up会随机抽取幸运观众的!尽量的回复发弹幕吧!
粉丝:6981
视频地址复制
Flash地址复制
Html地址复制
离线看更方便
用或其他应用扫描二维码
自制 饮料被舍友坑了。。这个是steam上面的,有兴趣的可以去看一下。。。有想来 有喜欢 饮料的 或者想要多多互动的请加饮料qq群:或者关注我的微博:K饮料喝多了 :) 还有我舍友已经死了
广播电视节目制作经营许可证:(沪)字第1248号
网络文化经营许可证:沪网文[6号
信息网络传播视听节目许可证:0910417
互联网ICP备案:沪ICP备号-3
沪ICP证:沪B2-
违法不良信息举报邮箱:
违法不良信息举报电话: 转 3n. 游戏;比赛
adj. 勇敢的
n. (Game)人名;(英)盖姆;(法)加姆;(西)加梅
在嬉戏窗口中寻找带有“Speed”标志的快速游戏(Game)即可。
基于1186个网页-
GAME (Perfume专辑)
中文:GAME (Perfume专辑);英语:Game;日语:GAME (Perfumeのアルバム);法语:GAME (album);韩语:GAME (??);
基于500个网页-
中文:游戏;英语:game;日语:ゲーム;法语:韩语:??;
基于500个网页-
6温暖的阳光洒在赛场上,男子乙组标枪的比赛(Game)即将开始。赛场上,一道道优美的弧线将轻盈地划过天空。
基于454个网页-
开始新游戏
是开始新游戏
搜狐休闲游戏平台
最后通牒赛局
最后通牒博弈
最后通牒赛局
最后通牒游戏
隐蔽类游戏
隐蔽类游戏
更多收起网络短语
- 引用次数:11287
Chapter Two Basic theory of game theory.
第二章博弈的基本理论。
参考来源 -
- 引用次数:528
As a new cultural industry, computer game attracted many young men.
电脑游戏作为一种新兴的文化产业,吸引着无数的年轻人。
参考来源 -
- 引用次数:349
In essence, virtual operating is a problem of benefits game.
最后指出虚拟经营是一个复杂开放的动态系统,并提出了解决其复杂性问题的对策。
参考来源 -
- 引用次数:1313
The Match-Game is a simple and fun game.
速配游戏是款简单有趣的游戏。
参考来源 -
- 引用次数:454
. Action Graph Games is a new representation of Game theory.
行为图博弈模型是一种新型的博弈模型。
参考来源 -
- 引用次数:38
参考来源 -
&2,447,543篇论文数据,部分数据来源于NoteExpress
a single play of a sport or other contest
&the game lasted two hours&
a contest with rules to determine a winner
&you need four people to play this game&
an amusement or pastime
&they played word games&; & he thought of his painting as a game that filled his empty time&; & his life was all fun and games&
animal hunted for food or sport
the game equipment needed in order to play a particular game
&the child received several games for his birthday&
your occupation or line of work
&he's in the plumbing game&
(games) the score at a particular point or the score needed to win
&the game is 6 all&; & he is serving for the game&
the flesh of wild animals that is used for food
a secret scheme to do something (especially something underhand or illegal)
&I saw through his little game from the start&
frivolous or trifling behavior
&for actors, memorizing lines is no game&; & for him, life is all fun and games&
place a bet on
disabled in the feet or legs
&a game leg&
willing to face danger
以上来源于:
游戏,运动;玩耍,娱乐(活动);戏嬉;玩笑
(体育、棋类等的)比赛,对局
[复数]运动会,比赛会,竞技会
(比赛中的)一局,一盘,一场
(获胜所需的)得分,(比赛中的)积分;比分
体育用品,比赛器具,(棋、纸牌类的)游戏器具
比赛方式(或技巧);比赛规则;竞技状态
(需要技能、勇气、耐力等的)类似竞赛的活动;竞争
勇气,斗争精神;忍耐力
阴谋;策略;把戏,花招
[总称](野兽、野禽等的)猎物,猎获物;野味
目的物;追求物;攻击(或嘲弄、凌辱)的对象
[口语]行业;职业;(尤指冒风险的)行当
[废语]狩猎
(被饲养天鹅的)一群
[the game][俚语]卖淫;做贼
猎物的,野味的,由猎物组成的;与狩猎有关的;捕鱼的
有(斗鸡般)斗志的,有胆量的,勇敢的,无畏的,顽强的,刚强的,有勇气的
精神饱满的;热情高的;坚强的,不屈不挠的;心甘情愿的,愿意的;渴望的;对…有兴趣的(常与 for 或不定式连用)
(打牌)赌博,赌赢
[古语]赌输(常与away连用)
ahead of the game
[美国口语]
(尤指在赌博中)处于赢家地位;领先,处于有利地位
提早,太早;事先,预先
as game as Ned Kelly
[澳大利亚口语]非常勇敢
[美国口语]情况,形势
[美国口语]比赛,竞争
活动中心,兴趣中心
beat someone at his own game
将计就计地战胜某人
be off one's game
竞技状态不好
be on one's game
竞技状态良好
cat-and-mouse game
伺机而动的把戏(如谈判等)
come that game
[口语]来那一手,采取那一套做法
consolation game
【体育】安慰赛
court game
【体育】使用场地的球类运动项目
crab (或 spoil) someone's game
[口语]坏某人的事,破坏某人的计划
至死不屈,壮烈地死去
【狩猎】易捕获的猎物
容易上当的人,易轻信的人
fly at higher game
胸怀大志,雄心勃勃
forbidden game
【狩猎】禁猎的鸟兽
碰不得的人,不能加以批评的人
force the game
【板球】冒险抢分
平局,得分相同;(桥牌、网球比赛中)各胜一局,各得一分
game and (set)
【网球】比赛结束
game and game
= game all
game and glee
game, set, and match
决定性的胜利,全面的胜利
give the game away (或 show)
露马脚,泄露机密,暴露计划
have a game with someone
欺骗某人,愚弄某人
have the game in one's hands
有必胜的把握,稳操胜券
make game of
取笑,嘲笑;同…开玩笑
not in the game
未必能成功
on the game
偷窃;卖淫,为娼
play a deep game
搞阴谋诡计;密谋,秘密策划
play a double game
搞两面三刀,耍阴谋手段
play a good game
手法高明,技术娴熟
play a losing game
进行无胜利希望的比赛,做注定要失败的事
play a nut's game
干蠢事,做傻事
play a poor game
技术不佳,手法笨拙
play a waiting game
[口语]见机行事,伺机而动,等待良机
play a winning game
干有把握的事,参加有胜利希望的比赛
play games
敷衍了事,不认真对待
play someone's game
(无意中)帮某人的大忙;做使某人获利的事,无意中当了某人的代理人[亦作 play the game of someone]
play the game
遵守规则,讲究体育道德
办事公道,行动光明正大
round game
圆桌游戏(尤指扑克牌戏)
see through someone's game
识破某人的阴谋,看穿某人的把戏
spoil someone's game
= crab someone's game
(用诗、画、动作等凑成一个字的)一种字谜
The game is (not) worth the candle.
这事(不)值得一做。
The game is up (或over).
(指所制定的计划、阴谋)完蛋了。一切均完了。
the same old game
[戏谑语]又是那套老玩意儿
throw (或 give) up the game
放弃计划,罢手;认输
Two can play at that game.
那一套不只你会,我也会。
What's the game?
你在干什么?(带有怀疑的意思)
发生什么事啦?
[口语](尤指腿)跛的,有残疾的;受伤的
更多收起结果
以上来源于:《21世纪大英汉词典》
A game is an activity or sport usually involving skill, knowledge, or chance, in which you follow fixed rules and try to win against an opponent or to solve a puzzle. 游戏; 运动
...the wonderful game of football.
…精彩的足球运动。
...a playful game of hide-and-seek.
…一个有趣的捉迷藏游戏。
A game is one particular occasion on which a game is played. 比赛
It was the first game of the season.
那是本赛季的第一场比赛。
He regularly watched our games from the stands.
他经常从看台上观看我们的比赛。
A game is a part of a match, for example in tennis or bridge, consisting of a fixed number of points. (比赛中的) 一局
She won six games to love in the second set.
第2盘她以6-0取胜。
Games are an organized event in which competitions in several sports take place. 运动会
...the 1996 Olympic Games at Atlanta.
…1996年亚特兰大奥林匹克运动会。
You can use game to describe a way of behaving in which a person uses a particular plan, usually in order to gain an advantage for himself or herself. 计谋
Until now, the Americans have been playing a very delicate political game.
至今美国人们还在玩弄非常微妙的政治计谋。
Wild animals or birds that are hunted for sport and sometimes cooked and eaten are referred to as game. 猎物
As men who shot game for food, they were natural marksmen.
作为捕捉猎物当食物的人,他们是天生的射手。
If you are game for something, you are willing to do something new, unusual, or risky. 敢尝试的
[v-link ADJ]
He said he's game for a similar challenge next year.
他说明年他敢尝试一次类似的挑战。
ful brave 勇敢的
to play games of chance for money, stakes, gamble 赌博
If someone or something gives the game away, they reveal a secret or reveal their feelings, and this puts them at a disadvantage. 泄露秘密; 露出马脚
The faces of the two conspirators gave the game away!
两个同谋者的表情露出了马脚。
If you are new to a particular game, you have not done a particular activity or been in a particular situation before. 对…不熟悉
Don't forget that she's new to this game and will take a while to complete the task.
别忘了她对此没有经验,将需要一些时间来完成那项任务。
If you beat someone at their own game, you use the same methods that they have used, but more successfully, so that you gain an advantage over them. 将计就计战胜某人
He must anticipate the manoeuvres of the other lawyers and beat them at their own game.
他必须对其他律师的策略有所准备,从而将计就计战胜他们。
If you say that someone is playing games or playing silly games, you mean that they are not treating a situation seriously and you are annoyed with them. 敷衍
This seemed to annoy Professor Steiner. "Don't play games with me," he thundered.
这似乎触怒了斯坦纳教授。“别敷衍我了,”他吼道。
a less common word for
玩游戏;行动光明正大;遵守比赛规则
偷窃;卖淫,为娼
博弈论,对策论
局面;球类运动;活动中心
足球赛;橄榄球比赛
奥林匹克运动会
容易受骗的人;容易捕获的猎物;轻信的人;娱乐游戏
视频游戏;电视游戏
玩游戏;做游戏;进行比赛
篮球比赛;篮球运动
开始新游戏
大博弈;大游戏;大角逐
游戏玩法;游戏性;博弈计划
领先,占优势;捷足先登
竞技状态好
扑克牌戏;纸片对策
更多收起词组短语
n. 游戏;比赛
adj. 勇敢的
勇敢的;味道强的;猎物多的
味道强的;勇敢的;多猎物的
勇敢地;不屈地
赌博;投机
赌博;赌胜负
勇敢,不认输
赌博;打赌(gamble的ing形式)
sport, game
多指户外的游戏或娱乐活动,如打球,游泳,打猎,赛马等; His favorite sport is swimming.
指决定胜负的游戏,通常有一套规则
以上来源于
match, game
这组词都有“比赛”的意思,其区别是:
多指重要的,参加队数较多的大型比赛。
指决定胜负的比赛,多以个人对抗或集体对抗形式根据一定的规则进行。
以上来源于
athletics, sport, game
这组词都有“体育运动”的意思,其区别是:
集合名词,常指需要体力与技术的sports与games,特指跳高、跑等竞技项目。
含义比athletics广泛,指各种形式的体育运动,尤指户外的如游泳、钓鱼、划船、登山等运动。
主要指决定胜负的游戏、比赛,通常有一定的规则,参加者必须遵守,如蓝球、足球等。也作“运动会”解。
以上来源于
I dived in when the game started.
游戏开始时我就参加进去了。
Tell me about the game.
告诉我比赛的情况。
At the end of the game the audience rose to their exciting exhibition.
比赛结束时观众对他们的精彩表演热烈地欢呼鼓掌。
On Sunday,millions of people in the United States and several other countries will watch the big game with friends and family.
VOA: special.
Almost any game you play has some kind of randomness or pseudorandomness which means that things change overtime somewhat unpredictably.
大多数你所玩过的游戏都有某种,随机数或者伪随机数,这就意味着每个事件都存在不可预测性。
She didn't hear the original command. Or did she just mishear in some very tragic version of the telephone game.
但是夏娃并没有亲耳听到上帝的命令,也许她从电话恶作剧中,听到了另一个版本。
McClaren has reassured Bentley his exclusion from the squad is only for one game.
Atari got cold feet, and dropped the idea -- and the game -- before completion.
It was perhaps best known for later PlayStation releases including the Wipeout racing game series.
“game”是个多义词,它可以指game(文娱活动的一种), game(日本电影), game(宝儿演唱歌曲), game(英语单词), game(电子游戏)。
以上来源于:
点击关注有道词典
$firstVoiceSent
- 来自原声例句
请问您想要如何调整此模块?
感谢您的反馈,我们会尽快进行适当修改!
请问您想要如何调整此模块?
感谢您的反馈,我们会尽快进行适当修改!当前位置: &
pitch-and-toss是什么意思
中文翻译掷钱游戏。
相邻词汇热门词汇
pitch-and-toss的中文翻译,pitch-and-toss是什么意思,怎么用汉语翻译pitch-and-toss,pitch-and-toss的中文意思,发音,例句,用法和解释由查查在线词典提供,版权所有违者必究。
&&&&&&&&&&&&&&&&
Copyright &
(京ICP备号)
All rights reserved下次自动登录
现在的位置:
& 综合 & 正文
AndEngine游戏开发系列教程(一)
链接地址:
AndEngine基于libGDX框架开发,使用OpenGL ES进行图形绘制,底层使用C++编写,通过JNI调用来实现,因此比较高效,功能强大。同时集成了Box2D物理引擎,因此能实现一些较为复杂的物理效果。在Rokon(另一个Android 2D游戏引擎)宣布停止更新以后,AndEngine成为Android最为流行的2D游戏引擎。相较Libgdx引擎:AndEngine拥有更多的游戏组件与扩展功能;并且它在默认情况下已经可以支持中文;采用屏幕坐标系绘也更符合一般Android绘图习惯。特点如下:
AndEngine是一个开源项目。这使得开发者在遇到问题时可以直接从源码上找到答案,也能按照自己的需要对AndEngine进行修改和扩展。AndEngine的源码在github上托管。②高效
AndEngine主要使用Java语言开发,但在大运算量的耗时功能时,AndEngine使用了C/C++本地进行开发。比如物理引擎或者音频处理。作为用户,你只需要关注Java端就可以了,它已经把所有的本地代码封装好了。相比于其他android游戏引擎,AndEngine的效率优势十分明显。③特效
AndEngine拥有Particle System (粒子系统),能够高效逼真的模拟火焰、雨雪、流水等效果。还拥有Motion Streak (动态模糊)、Ratial Blur (径向模糊) 等高级特效。④物理引擎
AndEngine对于物理引擎Box2D[3]的封装是让人惊讶的。 它使用JNI封装了Box2D的C++端,使得其运行效率比其他同级的物理引擎如Box2D快不少。如果你的游戏准备使用物理引擎,请优先考虑AndEngine。
⑤扩展丰富
AndEngine官方提供数个扩展包。例如:AndEngineLiveWallpaperExtension动态壁纸扩展、AndEngineTexturePackerExtension纹理打包扩展、AndEnginePhysicsBox2DExtension物理引擎扩展、AndEngineMultiplayerExtension多玩家扩展 等等。这使得开发者可以轻松实现众多功能。
二、初始构建
1.新建一个工程,在工程根目录新建一个lib文件夹(如果有就不必新建),将jar文件粘贴到lib文件夹下,右击jar文件--build path--add to build path ,接下来,右击jar文件--build path--configure build path-如图将andengine.jar勾选
2.简单的启动画面
这里将用andengine将一个贴图绘制出来,需要修改Activity代码。
public class LeekaoActivity extends BaseGameActivity {
// 摄像头尺寸
private static final int CAMERA_WIDTH = 800;
private static final int CAMERA_HEIGHT = 480;
private Camera mC
private Texture mT
private TextureRegion mLeekaoTextureR
// 以下是覆写超类及接口中的方法
public Engine onLoadEngine() {
this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
// TODO Auto-generated method stub
return new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE,
new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT),
this.mCamera));
public void onLoadResources() {
// TODO Auto-generated method stub
this.mTexture = new Texture(,
TextureOptions.BILINEAR_PREMULTIPLYALPHA);
this.mLeekaoTextureRegion = TextureRegionFactory.createFromAsset(
this.mTexture, this, "leekao/leekao.jpg", 0, 0);
this.mEngine.getTextureManager().loadTexture(this.mTexture);
public Scene onLoadScene() {
// TODO Auto-generated method stub
this.mEngine.registerUpdateHandler(new FPSLogger());
final Scene scene=new Scene(1);
//摄像头置于画面中央
final int centerX=(CAMERA_WIDTH-this.mLeekaoTextureRegion.getWidth())/2;
final int centerY=(CAMERA_HEIGHT-this.mLeekaoTextureRegion.getHeight())/2;
//创建Sprite对象并加入Scene对象中
final Sprite leekao=new Sprite(centerX,centerY, mLeekaoTextureRegion);
scene.getLastChild().attachChild(leekao);
public void onLoadComplete() {
// TODO Auto-generated method stub
效果图如下:
上面代码的效果是显示一个画面,代码看起来好像好多,现在来看看代码:
可以发现和平时不一样的是,继承了BaseGameActivity类,该类是完成了AndEngine的一些初始化工作,并提供了相关的覆写方法。(在写代码时可以右击--source--Override/implement mthods 勾选相关方法来加快写代码速度 )。接着设置了摄像头视角的尺寸。
代码覆写方法解析:
【】onLoadEngine()会在游戏引擎被该activity所加载时调用,这里初始化了摄像头与引擎对象。在引擎对象中,我将屏幕方向设置为横屏(LANDSCAPE)。接着有一个RatioResolutionPolicy的ResolutionPolicy对象,引擎可以根据该策略在不同的屏幕大小下缩放图像,同时保持原有的纵横比。
【】onLoadResources()方法会在加载资源时被调用。这里需要创建一个Texture对象来存放TextureRegion对象进行图像的加载。至于TextureOptions为图片的渲染方式,将在之后的章节说明。最后将贴图对象载入引擎的TextureManage中去。(在assets/leekao文件夹夹下已经准备好了图片)
【】onLoadScene()方法会在引擎将要显示场景时调用,在代码中初始化了帧数计数器,创建了一个仅有一层的场景,并将摄像头至于画面的中央,创建了表示启动画面的精灵对象,将他附到场景上。
【】onLoadComplete()方法会在引擎初始化完成时调用,目前还没在此阶段进行操作。
示例源码免费下载地址:
三、Engine对象
从上一章中可以知道,AndEngine包含了一个叫做Engine的类,该类同Android运行环境一起来实现游戏的进行。Engine是Activity的核心,开发AndEngine游戏首先要做的就是覆写onLoadEngine()方法。初始化Engine对象:
public Engine onLoadEngine() {
this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
// TODO Auto-generated method stub
return new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE,
new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT),
this.mCamera));
Engine对象的作用:
①初始化并持续维护着OpenGL的SurfaceView对象,该对象用来在屏幕上绘制
②管理用户的输入行为
③管理各种传感器的输入
④管理文本字体库
⑤创建并管理音乐音效的加载和播放。
⑥定期更新AndEngine其余部分的逻辑, 以推动游戏状态的改变。
Engine的默认构造器是:
public Engine(final EngineOptions pEngineOptions)
EngineOptions类的构造器:
public EngineOptions(boolean pFullscreen, ScreenOrientation pScreenOrientation, IResolutionPolicy pResolutionPolicy, Camera pCamera)
传给新EngineOptions的参数告知AndEngine应如何设置游戏的Engine对象
①pFullscreen:是否全屏显示;
②ScreenOrientation:可取的值 LANDSCAPE(横屏) PORTRAIT(竖屏)
③pResolutionPolicy:告知Engine对象如何处理不同的设备屏幕大小:
RatioResourcePolcy:在保持长宽比不变的情况下尽可能的拉伸图像以填满屏幕。上面的就是用这个方法。FillResourcePolicy:忽略长宽比,直接填满整个屏幕。FixedResourcePolicy:使用固定的长宽比,不进行缩放。RelativeResourcePolicy:将原图缩放到指定的倍数。
④pCamera:表示玩家观察场景所用的摄像机视点,构造器:
Camera(float pX, float pY, float pWidth, float pHeight)
pX与pY表示原点坐标,pWidth与pHeight表示场景可见部分的长和宽,单位就是像素。
四、菜单场景
AndEngine提供了一个菜单系统MenuScene,该系统将菜单集成到游戏当中去,支持文本菜单和图形菜单。菜单在AndEngine中属于一个特殊的场景类,显示的是一个由文本或图形组成的有序列表,而且当玩家触摸时可以相应带动画的效果。
MenuScene类是Scene的子类,有4个构造器:
1)MenuScene()
2)MenuScene(final Camera pCamer)
3)MenuScene(final IOnMenuItemClickListencer pOnMenuItemClickListencer )
4)MenuScene(final Camera pCamer,final IOnMenuItemClickListencer pOnMenuItemClickListencer )
pCamer用以显示场景的Canmera对象
pOnMenuItemClickListencer 为菜单点击事件的监听器
MenuScene类的相关方法
①addMenuItem(final IMenuItem pMeuItem)
加入菜单项
②getMenuItmCount()
返回菜单列表中所含菜单项的数目
③setChildScene(Scene pChildScene, boolean pModalDraw, boolean pModalUpdate, boolean pModalTouch)
将一个场景作为子场景附加到当前菜单场景上
菜单项的种类:
TextMenuItem文字菜单项:构造器
TextMenuItem(int pID, Font pFont, String pText)
pID:唯一的整数标识符,用于在onClick()回调方法中标识被点击的菜单。
pFont:显示菜单时所用的字体
pText:显示的文本
SpriteMenuItem图形菜单项:
SpriteMenuItem(int pID, TextureRegion pTextureRegion)
pTextureRegion:用以显示图形菜单项的精灵贴图
AnimatedSpritMenuItem动画菜单项:
AnimatedSpriteMenuItem(final
int pID,fina TiledTextureRegion pTileTextureRegion)
pTileTextureRegion:显示动画精灵的贴图,之后的章节会讲。
ColorMenuItemDecorator复合颜色菜单项:
ColorMenuItemDecorator(IMenuItem pMenuItem, float pSelectedRed, float pSelectedGreen, float pSelectedBlue, float pUnselectedRed, float pUnselectedGreen, float pUnselectedBlue)
当点击时菜单项的颜色会发生改变,虽然参数好多,其实很简单的,就是RGB的颜色值而以。
pMenuItem要修饰的菜单项。
ScaleMenuItemDecorator复合缩放菜单项:
ScaleMenuItemDecorator(IMenuItem pMenuItem,float pSelectedScale,float pUnselctedScale)
跟上面的方法差不多,当点击时菜单项的大小会发生改变。
除了默认的Engine外,AndEngine还提供了其他的Engine类,以下这些类都是Engine类的子类,所以继承了其基本特点。
FixedStepEngine:可以达到最快的帧速率
LimitedFPSEngine:以固定的帧速率运行
SingleSceneSplitScreenEngine:在两个窗口中分别从不同的视点显示同一个场景
DoubleSceneSplitScreenEngine:分屏显示不同的场景
示例源码免费下载地址:
&P&public class MainMenu extends BaseGameActivity implements
IOnMenuItemClickListener {
private static final int CAMERA_WIDTH = 800;
private static final int CAMERA_HEIGHT = 480;
// 菜单项的引索ID
protected static final int MENU_PLAY = 0;
protected static final int MENU_SCORES = MENU_PLAY + 1;
protected static final int MENU_OPTIONS = MENU_SCORES + 1;
protected static final int MENU_ABOUT = MENU_OPTIONS + 1;
protected static final int MENU_EXIT = MENU_ABOUT + 1;
protected Camera mC
protected Scene mMenuS
private Texture mMenuBGT
private TextureRegion mMenuBGTextureR
private Texture mExitT
private TextureRegion mExitTextureR
protected MenuScene mStaticMenuS
protected Texture mFontT
public Engine onLoadEngine() {
// TODO Auto-generated method stub
this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
return new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE,
new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT),
this.mCamera));
public void onLoadResources() {
// TODO Auto-generated method stub
// 载入font与texture
this.mFontTexture = new Texture(256, 256,
TextureOptions.BILINEAR_PREMULTIPLYALPHA);
FontFactory.setAssetBasePath("fonts/");
this.mfont = FontFactory.createFromAsset(this.mFontTexture, this,
"JOKERMAN.TTF", 50, true, Color.RED);
this.mEngine.getTextureManager().loadTexture(this.mFontTexture);
this.mEngine.getFontManager().loadFont(this.mfont);
this.mMenuBGTexture = new Texture(,
TextureOptions.BILINEAR_PREMULTIPLYALPHA);
this.mMenuBGTextureRegion = TextureRegionFactory.createFromAsset(
mMenuBGTexture, this, "menu/menu_bg.jpg", 0, 0);
this.mEngine.getTextureManager().loadTexture(mMenuBGTexture);
// 退出按钮的贴图
this.mExitTexture = new Texture(256, 256,
TextureOptions.BILINEAR_PREMULTIPLYALPHA);
this.mExitTextureRegion = TextureRegionFactory.createFromAsset(
mExitTexture, this, "menu/menu_exit.png", 0, 0);
this.mEngine.getTextureManager().loadTexture(mExitTexture);
protected void createStaticMenuScene() {
this.mStaticMenuScene = new MenuScene(this.mCamera);
final IMenuItem playMenuItem = new ColorMenuItemDecorator(
new TextMenuItem(MENU_PLAY, mfont, "Play Game"), 0.5f, 0.5f,
0.5f, 1.0f, 0.0f, 0.0f);
playMenuItem.setBlendFunction(GL10.GL_SRC_ALPHA,
GL10.GL_ONE_MINUS_SRC_ALPHA);
this.mStaticMenuScene.addMenuItem(playMenuItem);
final IMenuItem scoresMenuItem = new ScaleMenuItemDecorator(
new TextMenuItem(MENU_SCORES, mfont, "Scores"), 1.2f, 1.0f);
scoresMenuItem.setBlendFunction(GL10.GL_SRC_ALPHA,
GL10.GL_ONE_MINUS_SRC_ALPHA);
this.mStaticMenuScene.addMenuItem(scoresMenuItem);
final IMenuItem optionsMenuItem = new ColorMenuItemDecorator(
new ScaleMenuItemDecorator(new TextMenuItem(MENU_OPTIONS,
mfont, "Options"), 1.2f, 1.0f), 0.5f, 0.5f, 0.5f, 1.0f,
1.0f, 1.0f);
optionsMenuItem.setBlendFunction(GL10.GL_SRC_ALPHA,
GL10.GL_ONE_MINUS_SRC_ALPHA);
this.mStaticMenuScene.addMenuItem(optionsMenuItem);
final IMenuItem aboutMenuItem = new TextMenuItem(MENU_ABOUT, mfont,
aboutMenuItem.setBlendFunction(GL10.GL_SRC_ALPHA,
GL10.GL_ONE_MINUS_SRC_ALPHA);
this.mStaticMenuScene.addMenuItem(aboutMenuItem);
final IMenuItem exitMenuItem = new ScaleMenuItemDecorator(
new SpriteMenuItem(MENU_EXIT, mExitTextureRegion), 1.2f, 1.0f);
exitMenuItem.setBlendFunction(GL10.GL_SRC_ALPHA,
GL10.GL_ONE_MINUS_SRC_ALPHA);
this.mStaticMenuScene.addMenuItem(exitMenuItem);
this.mStaticMenuScene.buildAnimations();
this.mStaticMenuScene.setBackgroundEnabled(false);
this.mStaticMenuScene.setOnMenuItemClickListener(this);
public Scene onLoadScene() {
// TODO Auto-generated method stub
this.mEngine.registerUpdateHandler(new FPSLogger());
this.createStaticMenuScene();
final int centerX = (CAMERA_WIDTH - this.mMenuBGTextureRegion
.getWidth()) / 2;
final int centerY = (CAMERA_HEIGHT - this.mMenuBGTextureRegion
.getHeight()) / 2;
this.mMenuScene = new Scene(1);
final Sprite menubg = new Sprite(centerX, centerY, mMenuBGTextureRegion);
mMenuScene.getLastChild().attachChild(menubg);
mMenuScene.setChildScene(mStaticMenuScene);
return this.mMenuS
public void onLoadComplete() {
// TODO Auto-generated method stub
public boolean onMenuItemClicked(MenuScene pMenuScene, IMenuItem pMenuItem,
float pMenuItemLocalX, float pMenuItemLocalY) {
// TODO Auto-generated method stub
switch (pMenuItem.getID()) {
case MENU_PLAY:
Toast.makeText(MainMenu.this, "paly selected", Toast.LENGTH_SHORT)
case MENU_SCORES:
Toast.makeText(MainMenu.this, "scores selected", Toast.LENGTH_SHORT)
case MENU_OPTIONS:
Toast.makeText(MainMenu.this, "options selected",
Toast.LENGTH_SHORT).show();
case MENU_ABOUT:
Toast.makeText(MainMenu.this, "about selected", Toast.LENGTH_SHORT)
五、实体Entity
在AndEngine中,我们看到的游戏元素都是Entity的子类,像场景Scene,精灵Sprite,瓦片Tile,图形Texture,粒子Partical,文本等都是Entity对象。Entity对象可以通过修改器Modifier对象来修改。AndEngine在游戏设计上采用了实体/组件设计方法,该方法将所有的物体都看做Entity对象,而不是为每种物体设计一个类。相对于完全的面向对象,这样的好处是代码便于管理,可以更方便的修改。
Entity类:
Entity是包括Scene类内所有可见物体的超类,所以也包括可见物体的公共属性,所以可以设置Modifier来修改。这些属性有:
【】float mX,mY Entity对象当前的位置
【】float mInitialX,mInitialY 对象的初始位置
【】boolean mVisible 对象是否可见
【】boolean mIgnoredUpdate
对象是否更新
【】int mZindex 对象在显示序列中的位置(比如图层的叠加)
【】IEntity mParent 此对象的上层对象
【】SmartList&IEntity& mChildren 对象的子对象列表
【】float mRotation
对象的旋转角度
对象的缩放因子
【】float mAlpha 对象的透明度
【】UpdateHandlerList mUpdateHandlers 应用于此对象的UpdateHandler对象列表
Entity类的构造器和方法:
Entity(final float pX,final float pY)
float getX() /getY() 返回当前位置的x,y坐标。
float getInitialX() /getIntialY()返回Entity对象的初始x,y坐标
void setPosition(final float px,final float py) 设置Entity对象位置
setPosition(final IEnity pOtherEntity)将传入Entity对象的位置设定为此Entity对象的位置
float isScaled() 如果缩放因子不是1.0f,则返回true
float getScaleX() 返回横向缩放因子
void setScale(final float pScaleX,fnal float pScaleY) 设定两个方向的缩放因子
在AndEnigine中,Entity对象的颜色是一个乘数,相当与在原图上进行叠加染色。
float getRed()...
void setColor(final float pRed,final float pGreen ,final float pBlue,final float pAlpha)
float getRotation()
setRotation(final float pRotation)
获取,设置旋转角度。
管理子对象
Entity对象通常是分层组织起来的,以便批量修改。如果上层对象被修改了,那么修改的效果会自动应用于他的所有子对象,但是,子对象的修改效果不会传递到上层。
IEnitity getFirstChild()
getLastChild()
获得此Entity对象的第一个及最后一个子对象。
void attachChild(final IEntity pEntity)
将新对象加入到此Entity对象,并作为最后一个子对象。
IEntity getChild(final int index)
返回cshu所在位置的子对象
int getChildCount()
得到子对象的数目
篇幅过长,加载过慢,分下一篇
&&&&推荐文章:
【上篇】【下篇】

我要回帖

更多关于 and是什么意思 的文章

 

随机推荐