1、DrawTile参数的解析。
/** * Draws a texture to an axis-aligned quad at CurX,CurY. * * @param Tex - The texture to render. * @param XL - The width of the quad in pixels. * @param YL - The height of the quad in pixels. * @param U - The U coordinate of the quad's upper left corner, in normalized coordinates. * @param V - The V coordinate of the quad's upper left corner, in normalized coordinates. * @param UL - The range of U coordinates which is mapped to the quad. * @param VL - The range of V coordinates which is mapped to the quad. * @param LColor - Color to colorize this texture. * @param bClipTile - Whether to clip the texture (FALSE by default). */ native noexport final function DrawTile(Texture Tex, float XL, float YL, float U, float V, float UL, float VL, optional LinearColor LColor, optional bool ClipTile);
DrawTile是用来在HUD界面上绘制一个纹理图标的函数,参数解析如下:
Tex - 纹理名
XL、YL指的是X、Y方向的缩放。
U、V指的是离图片左上角的偏移值,单位是像素。
UL、VL指的是截取图标的大小,单位像素。
如图所示,如果我们想要绘制整个文件中的这一十字光标,代码可以这样写;
CursorTexture=Texture2D'UI_HUD.HUD.UI_HUD_BaseA'................
Canvas.DrawTile(CursorTexture, 50 , 50, 215, 100, 50,50);
如果我们想把光标在显示的时候放大一倍,那我们可以把XL与YL乘与2
Canvas.DrawTile(CursorTexture, 50*2 , 50*2, 215, 100, 50,50);
2、关到UDK的Crowd System群体动画系统
详细的操作方法在网上有很多视频,在下面这篇sunlovesusu写的文章中也图文并茂地作了解析。
http://blog.csdn.net/sunlovesusu/article/details/4882264
文章中的方法是正确的,只是在UDK2011-05之后,对怪兽的生成方式做了一些改变。
sunlovesusu的文章最后一步写到怎么添加UTGameCrowdAgent对像,如图:
在新的UDK里你会发现找不到Agent Archetypes这一个选项了。取而代之是的一个叫Crowd Agent List栏目,如下图:
我们可以打开ActorClass,不要勾选所有分类选项,这样我们就能打到GameCrowd_ListOfAgents这一选项了。
----------------------------------------------------------------------------------------------------------------------------
右键点击CreateArchetype...,在弹出的对话框中生成一个ListAgents
-----------------------------------------------------------------------------------------------------------------------------
在GameCrowdListAgent01的属性中把之前sunlovesusu教程中生成的CrowdAgent指定到Agent Archetype选项。
最后再设置Kismit的参数:在Kismet里面选择UT Crowd Spawner,在左下的属性菜单里面设置Crow Agent List即可
==============================================================================================================