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即可
==============================================================================================================